(function () {
  var t = {
    629: function _() {
      !function () {
        var t = "undefined" != typeof window ? window : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof GameGlobal ? GameGlobal : {};
        "undefined" == typeof window && (t.window = t);
        window.zs = window.zs || {};
        var e = undefined !== window.ks ? window.ks : undefined !== window.tt ? window.tt : undefined !== window.wx ? window.wx : null;
        var o = undefined !== window.ks ? "ks" : undefined !== window.tt ? "tt" : undefined !== window.wx ? "wx" : "web";
        zs.pf = o;
        if (!e) {
          zs.login = function (t) {
            var e;
            var o = function o() {
              var e;
              var o;
              null == t || null === (e = t.fail) || undefined === e || e.call(t, {
                errCode: -1,
                errMsg: "平台不支持"
              });
              null == t || null === (o = t.complete) || undefined === o || o.call(t);
            };
            (e = [{
              name: "device",
              keyPath: "name"
            }], new Promise(function (t, o) {
              if (window.indexedDB) {
                var n = window.indexedDB.open("zs_sdk", 2);
                n.onerror = function () {
                  o && o({
                    errCode: -1,
                    errMsg: "登录失败"
                  });
                };
                n.onsuccess = function (e) {
                  var o = e.target.result;
                  t(o);
                };
                n.onupgradeneeded = function (t) {
                  var o = t.target.result;
                  e.forEach(function (t) {
                    if (!o.objectStoreNames.contains(t.name)) {
                      if (t.keyPath) {
                        o.createObjectStore(t.name, {
                          keyPath: t.keyPath
                        });
                      } else {
                        o.createObjectStore(t.name, {
                          autoIncrement: true
                        });
                      }
                    }
                  });
                };
              } else {
                o && o({
                  errCode: -1,
                  errMsg: "平台不支持"
                });
              }
            })).then(function (e) {
              (function (t, e) {
                return new Promise(function (o) {
                  t.transaction(e).objectStore(e).openCursor().onsuccess = function (t) {
                    var e = t.target.result;
                    if (e) {
                      "uuid" === e.key && o(e.value);
                      e.continue();
                    } else {
                      o(null);
                    }
                  };
                });
              })(e, "device").then(function (o) {
                var n;
                var i;
                var r;
                if (null == o) {
                  r = "web_" + Math.random().toString(36).substring(2);
                  (function (t, e, o) {
                    new Promise(function () {
                      var n = t.transaction([e], "readwrite").objectStore(e).put(o);
                      n.onsuccess = function () {};
                      n.onerror = function () {};
                    });
                  })(e, "device", {
                    name: "uuid",
                    value: r
                  });
                } else {
                  r = o.value;
                }
                null == t || null === (n = t.success) || undefined === n || n.call(t, {
                  pf: "zs",
                  code: r
                });
                null == t || null === (i = t.complete) || undefined === i || i.call(t);
              }).catch(function () {
                o();
              });
            }).catch(function () {
              o();
            });
          };
          zs.request = function (t) {
            if (null != t) {
              var e = true;
              var o = t.url;
              if (null != o && "" !== o) {
                var n;
                var i = t.responseType || "text";
                var r = t.dataType || "json";
                var a = t.timeout || 6e4;
                var s = new XMLHttpRequest();
                var c = t.method || "GET";
                var l = null;
                if (t.data && "string" != typeof t.data) {
                  if ("GET" === c || "application/x-www-form-urlencoded" === (null === (n = t.header) || undefined === n ? undefined : n["content-type"])) {
                    l = function (t) {
                      var e = "";
                      for (var o in t) {
                        e += "".concat(encodeURIComponent(o), "=").concat(encodeURIComponent(t[o]), "&");
                      }
                      return e.slice(0, e.length - 1);
                    }(t.data);
                    "GET" === c && (o += l);
                  } else {
                    l = JSON.stringify(t.data);
                  }
                } else {
                  l = t.data;
                }
                s.onreadystatechange = function () {
                  if (4 == s.readyState) {
                    if (s.status >= 200 && s.status < 400) {
                      var e;
                      var o;
                      var n = null;
                      n = "arraybuffer" === i ? s.response : s.responseText;
                      if ("json" === r) {
                        try {
                          n = JSON.parse(n);
                        } catch (t) {
                          return void p(-1, "服务器数据解析失败");
                        }
                      }
                      null === (e = t.success) || undefined === e || e.call(t, {
                        data: n,
                        statusCode: s.status,
                        header: s.getAllResponseHeaders()
                      });
                      return void (null === (o = t.complete) || undefined === o || o.call(t));
                    }
                    p(s.status, "网络请求失败");
                  }
                };
                s.onerror = function () {
                  p(-1, "网络请求错误");
                };
                s.ontimeout = function () {
                  p(-1, "网络请求超时");
                };
                s.timeout = a;
                s.responseType = i;
                s.open(c, o, true);
                if (t.header) {
                  for (var u in t.header) {
                    s.setRequestHeader(u, t.header[u]);
                  }
                }
                if ("POST" === c && null != l) {
                  s.send(l);
                } else {
                  s.send();
                }
                return s;
              }
              p(-1, "网络请求地址为空");
            }
            function p(o, n) {
              var i;
              var r;
              if (e) {
                e = false;
                null === (i = t.fail) || undefined === i || i.call(t, {
                  errCode: o,
                  errMsg: n
                });
                null === (r = t.complete) || undefined === r || r.call(t);
              }
            }
          };
          zs.getLaunchOptionsSync = function () {
            return {};
          };
          zs.getSystemInfoSync = function () {
            return {};
          };
          zs.getSystemInfo = function (t) {
            var e;
            var o;
            null == t || null === (e = t.success) || undefined === e || e.call(t, {});
            null == t || null === (o = t.complete) || undefined === o || o.call(t, {});
          };
          zs.setStorageSync = localStorage.setItem;
          zs.getStorage = function (t) {
            var e;
            var o;
            var n = localStorage.getItem(t.key);
            null == t || null === (e = t.success) || undefined === e || e.call(t, n);
            null == t || null === (o = t.complete) || undefined === o || o.call(t);
          };
          zs.getStorageSync = localStorage.getItem;
          zs.removeStorageSync = localStorage.removeItem;
          zs.getStorageInfoSync = function () {
            return null;
          };
          zs.getNetworkType = function (t) {
            var e;
            var o;
            null == t || null === (e = t.success) || undefined === e || e.call(t, {
              networkType: "unknown"
            });
            null == t || null === (o = t.complete) || undefined === o || o.call(t, {
              networkType: "unknown"
            });
          };
          zs.onShow = function () {};
          zs.onHide = function () {};
          return void (zs.getAccountInfoSync = function () {
            return {
              miniProgram: {
                envVersion: "develop",
                version: "1.0.0"
              }
            };
          });
        }
        zs.login = function (t) {
          e.login({
            success(n) {
              var i;
              if ("ks" === o && t.old) {
                e.getUserInfo({
                  success(e) {
                    var o;
                    if (null != e && e.unionID) {
                      t.success({
                        pf: "ks",
                        is_old: 0,
                        unionID: e.unionID
                      });
                    } else {
                      null === (o = t.fail) || undefined === o || o.call(t, {
                        errCode: -1,
                        errMsg: "不支持"
                      });
                    }
                  },
                  fail: t.fail,
                  complete: t.complete
                });
              } else {
                n.pf = o;
                "ks" === o && (n.is_old = 1);
                null === (i = t.success) || undefined === i || i.call(t, n);
              }
            },
            fail(e) {
              var o;
              var n;
              null === (o = t.fail) || undefined === o || o.call(t, e);
              null === (n = t.complete) || undefined === n || n.call(t);
            },
            complete: t.complete
          });
        };
        zs.request = e.request;
        zs.getLaunchOptionsSync = function () {
          var t = e.getLaunchOptionsSync();
          "ks" === o && (t.scene = t.from);
          return t;
        };
        zs.getSystemInfoSync = e.getSystemInfoSync;
        zs.getSystemInfo = e.getSystemInfo;
        zs.setStorageSync = e.setStorageSync;
        zs.getStorage = e.getStorage;
        zs.getStorageSync = e.getStorageSync;
        zs.removeStorageSync = e.removeStorageSync;
        zs.getStorageInfoSync = e.getStorageInfoSync;
        zs.getNetworkType = e.getNetworkType;
        zs.onShow = e.onShow;
        zs.onHide = e.onHide;
        if ("tt" === o) {
          var n = null;
          zs.getAccountInfoSync = function () {
            if (n) {
              return {
                miniProgram: n
              };
            }
            n = {};
            var t = zs.getLaunchOptionsSync();
            if (t && t.extra) {
              n.version = t.extra.mpVersion;
              n.appId = t.extra.appId;
            }
            if (tt.getEnvInfoSync) {
              var e = tt.getEnvInfoSync().microapp.envType;
              n.envVersion = "production" === e ? "release" : "development" === e ? "trial" : "preview" === e ? "develop" : e;
            }
            return {
              miniProgram: n
            };
          };
        } else {
          zs.getAccountInfoSync = e.getAccountInfoSync;
        }
      }();
    },
    184: function _(t, e, o) {
      function n() {
        n = function n() {
          return e;
        };
        var t;
        var e = {};
        var o = Object.prototype;
        var r = o.hasOwnProperty;
        var a = Object.defineProperty || function (t, e, o) {
          t[e] = o.value;
        };
        var s = "function" == typeof Symbol ? Symbol : {};
        var c = s.iterator || "@@iterator";
        var l = s.asyncIterator || "@@asyncIterator";
        var u = s.toStringTag || "@@toStringTag";
        function p(t, e, o) {
          Object.defineProperty(t, e, {
            value: o,
            enumerable: true,
            configurable: true,
            writable: true
          });
          return t[e];
        }
        try {
          p({}, "");
        } catch (t) {
          p = function p(t, e, o) {
            return t[e] = o;
          };
        }
        function d(t, e, o, n) {
          var i = e && e.prototype instanceof _ ? e : _;
          var r = Object.create(i.prototype);
          var s = new R(n || []);
          a(r, "_invoke", {
            value: M(t, o, s)
          });
          return r;
        }
        function h(t, e, o) {
          try {
            return {
              type: "normal",
              arg: t.call(e, o)
            };
          } catch (t) {
            return {
              type: "throw",
              arg: t
            };
          }
        }
        e.wrap = d;
        var f = "suspendedStart";
        var y = "suspendedYield";
        var g = "executing";
        var v = "completed";
        var m = {};
        function _() {}
        function S() {}
        function b() {}
        var w = {};
        p(w, c, function () {
          return this;
        });
        var P = Object.getPrototypeOf;
        var O = P && P(P(x([])));
        O && O !== o && r.call(O, c) && (w = O);
        var C = b.prototype = _.prototype = Object.create(w);
        function N(t) {
          ["next", "throw", "return"].forEach(function (e) {
            p(t, e, function (t) {
              return this._invoke(e, t);
            });
          });
        }
        function A(t, e) {
          function o(n, a, s, c) {
            var l = h(t[n], t, a);
            if ("throw" !== l.type) {
              var u = l.arg;
              var p = u.value;
              if (p && "object" == i(p) && r.call(p, "__await")) {
                return e.resolve(p.__await).then(function (t) {
                  o("next", t, s, c);
                }, function (t) {
                  o("throw", t, s, c);
                });
              } else {
                return e.resolve(p).then(function (t) {
                  u.value = t;
                  s(u);
                }, function (t) {
                  return o("throw", t, s, c);
                });
              }
            }
            c(l.arg);
          }
          var n;
          a(this, "_invoke", {
            value(t, i) {
              function r() {
                return new e(function (e, n) {
                  o(t, i, e, n);
                });
              }
              return n = n ? n.then(r, r) : r();
            }
          });
        }
        function M(e, o, n) {
          var i = f;
          return function (r, a) {
            if (i === g) {
              throw Error("Generator is already running");
            }
            if (i === v) {
              if ("throw" === r) {
                throw a;
              }
              return {
                value: t,
                done: true
              };
            }
            n.method = r;
            for (n.arg = a;;) {
              var s = n.delegate;
              if (s) {
                var c = I(s, n);
                if (c) {
                  if (c === m) {
                    continue;
                  }
                  return c;
                }
              }
              if ("next" === n.method) {
                n.sent = n._sent = n.arg;
              } else if ("throw" === n.method) {
                if (i === f) {
                  throw i = v, n.arg;
                }
                n.dispatchException(n.arg);
              } else {
                "return" === n.method && n.abrupt("return", n.arg);
              }
              i = g;
              var l = h(e, o, n);
              if ("normal" === l.type) {
                i = n.done ? v : y;
                if (l.arg === m) {
                  continue;
                }
                return {
                  value: l.arg,
                  done: n.done
                };
              }
              if ("throw" === l.type) {
                i = v;
                n.method = "throw";
                n.arg = l.arg;
              }
            }
          };
        }
        function I(e, o) {
          var n = o.method;
          var i = e.iterator[n];
          if (i === t) {
            o.delegate = null;
            "throw" === n && e.iterator.return && (o.method = "return", o.arg = t, I(e, o), "throw" === o.method) || "return" !== n && (o.method = "throw", o.arg = new TypeError("The iterator does not provide a '" + n + "' method"));
            return m;
          }
          var r = h(i, e.iterator, o.arg);
          if ("throw" === r.type) {
            o.method = "throw";
            o.arg = r.arg;
            o.delegate = null;
            return m;
          }
          var a = r.arg;
          if (a) {
            if (a.done) {
              o[e.resultName] = a.value;
              o.next = e.nextLoc;
              if ("return" !== o.method) {
                o.method = "next";
                o.arg = t;
              }
              o.delegate = null;
              return m;
            } else {
              return a;
            }
          } else {
            o.method = "throw";
            o.arg = new TypeError("iterator result is not an object");
            o.delegate = null;
            return m;
          }
        }
        function T(t) {
          var e = {
            tryLoc: t[0]
          };
          1 in t && (e.catchLoc = t[1]);
          if (2 in t) {
            e.finallyLoc = t[2];
            e.afterLoc = t[3];
          }
          this.tryEntries.push(e);
        }
        function D(t) {
          var e = t.completion || {};
          e.type = "normal";
          delete e.arg;
          t.completion = e;
        }
        function R(t) {
          this.tryEntries = [{
            tryLoc: "root"
          }];
          t.forEach(T, this);
          this.reset(true);
        }
        function x(e) {
          if (e || "" === e) {
            var o = e[c];
            if (o) {
              return o.call(e);
            }
            if ("function" == typeof e.next) {
              return e;
            }
            if (!isNaN(e.length)) {
              var n = -1;
              var a = function o() {
                for (; ++n < e.length;) {
                  if (r.call(e, n)) {
                    o.value = e[n];
                    o.done = false;
                    return o;
                  }
                }
                o.value = t;
                o.done = true;
                return o;
              };
              return a.next = a;
            }
          }
          throw new TypeError(i(e) + " is not iterable");
        }
        S.prototype = b;
        a(C, "constructor", {
          value: b,
          configurable: true
        });
        a(b, "constructor", {
          value: S,
          configurable: true
        });
        S.displayName = p(b, u, "GeneratorFunction");
        e.isGeneratorFunction = function (t) {
          var e = "function" == typeof t && t.constructor;
          return !!e && (e === S || "GeneratorFunction" === (e.displayName || e.name));
        };
        e.mark = function (t) {
          if (Object.setPrototypeOf) {
            Object.setPrototypeOf(t, b);
          } else {
            t.__proto__ = b;
            p(t, u, "GeneratorFunction");
          }
          t.prototype = Object.create(C);
          return t;
        };
        e.awrap = function (t) {
          return {
            __await: t
          };
        };
        N(A.prototype);
        p(A.prototype, l, function () {
          return this;
        });
        e.AsyncIterator = A;
        e.async = function (t, o, n, i, r) {
          undefined === r && (r = Promise);
          var a = new A(d(t, o, n, i), r);
          if (e.isGeneratorFunction(o)) {
            return a;
          } else {
            return a.next().then(function (t) {
              if (t.done) {
                return t.value;
              } else {
                return a.next();
              }
            });
          }
        };
        N(C);
        p(C, u, "Generator");
        p(C, c, function () {
          return this;
        });
        p(C, "toString", function () {
          return "[object Generator]";
        });
        e.keys = function (t) {
          var e = Object(t);
          var o = [];
          for (var n in e) {
            o.push(n);
          }
          o.reverse();
          return function t() {
            for (; o.length;) {
              var n = o.pop();
              if (n in e) {
                t.value = n;
                t.done = false;
                return t;
              }
            }
            t.done = true;
            return t;
          };
        };
        e.values = x;
        R.prototype = {
          constructor: R,
          reset(e) {
            this.prev = 0;
            this.next = 0;
            this.sent = this._sent = t;
            this.done = false;
            this.delegate = null;
            this.method = "next";
            this.arg = t;
            this.tryEntries.forEach(D);
            if (!e) {
              for (var o in this) {
                "t" === o.charAt(0) && r.call(this, o) && !isNaN(+o.slice(1)) && (this[o] = t);
              }
            }
          },
          stop() {
            this.done = true;
            var t = this.tryEntries[0].completion;
            if ("throw" === t.type) {
              throw t.arg;
            }
            return this.rval;
          },
          dispatchException(e) {
            if (this.done) {
              throw e;
            }
            var o = this;
            function n(n, i) {
              s.type = "throw";
              s.arg = e;
              o.next = n;
              if (i) {
                o.method = "next";
                o.arg = t;
              }
              return !!i;
            }
            for (var i = this.tryEntries.length - 1; i >= 0; --i) {
              var a = this.tryEntries[i];
              var s = a.completion;
              if ("root" === a.tryLoc) {
                return n("end");
              }
              if (a.tryLoc <= this.prev) {
                var c = r.call(a, "catchLoc");
                var l = r.call(a, "finallyLoc");
                if (c && l) {
                  if (this.prev < a.catchLoc) {
                    return n(a.catchLoc, true);
                  }
                  if (this.prev < a.finallyLoc) {
                    return n(a.finallyLoc);
                  }
                } else if (c) {
                  if (this.prev < a.catchLoc) {
                    return n(a.catchLoc, true);
                  }
                } else {
                  if (!l) {
                    throw Error("try statement without catch or finally");
                  }
                  if (this.prev < a.finallyLoc) {
                    return n(a.finallyLoc);
                  }
                }
              }
            }
          },
          abrupt(t, e) {
            for (var o = this.tryEntries.length - 1; o >= 0; --o) {
              var n = this.tryEntries[o];
              if (n.tryLoc <= this.prev && r.call(n, "finallyLoc") && this.prev < n.finallyLoc) {
                var i = n;
                break;
              }
            }
            i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
            var a = i ? i.completion : {};
            a.type = t;
            a.arg = e;
            if (i) {
              this.method = "next";
              this.next = i.finallyLoc;
              return m;
            } else {
              return this.complete(a);
            }
          },
          complete(t, e) {
            if ("throw" === t.type) {
              throw t.arg;
            }
            if ("break" === t.type || "continue" === t.type) {
              this.next = t.arg;
            } else if ("return" === t.type) {
              this.rval = this.arg = t.arg;
              this.method = "return";
              this.next = "end";
            } else {
              "normal" === t.type && e && (this.next = e);
            }
            return m;
          },
          finish(t) {
            for (var e = this.tryEntries.length - 1; e >= 0; --e) {
              var o = this.tryEntries[e];
              if (o.finallyLoc === t) {
                this.complete(o.completion, o.afterLoc);
                D(o);
                return m;
              }
            }
          },
          catch: function _catch(t) {
            for (var e = this.tryEntries.length - 1; e >= 0; --e) {
              var o = this.tryEntries[e];
              if (o.tryLoc === t) {
                var n = o.completion;
                if ("throw" === n.type) {
                  var i = n.arg;
                  D(o);
                }
                return i;
              }
            }
            throw Error("illegal catch attempt");
          },
          delegateYield(e, o, n) {
            this.delegate = {
              iterator: x(e),
              resultName: o,
              nextLoc: n
            };
            "next" === this.method && (this.arg = t);
            return m;
          }
        };
        return e;
      }
      function i(t) {
        return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
          return typeof t;
        } : function (t) {
          if (t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype) {
            return "symbol";
          } else {
            return typeof t;
          }
        })(t);
      }
      t = o.nmd(t);
      var r = function r(t, e) {
        if (t.orderId && "string" == typeof t.orderId) {
          if ("number" != typeof t.amount || t.amount != t.amount) {
            console.warn("请填写正确的订单金额");
            return false;
          } else if ("string" != typeof t.currencyType || 3 !== t.currencyType.length) {
            console.warn("请填写正确的货币类型");
            return false;
          } else {
            return !e || "string" == typeof t.paymentType || undefined === t.paymentType || (console.warn("请填写正确的支付方式"), false);
          }
        } else {
          console.warn("请填写正确的订单ID");
          return false;
        }
      };
      var a = "function" == typeof Symbol && "symbol" == i(Symbol.iterator) ? function (t) {
        return i(t);
      } : function (t) {
        if (t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype) {
          return "symbol";
        } else {
          return i(t);
        }
      };
      var s = null;
      var c = [];
      var l = ["1", "0", "10"];
      var u = {
        device: true,
        network: true,
        uid: true
      };
      var p = {
        sdk: {
          version: l[0],
          minorVersion: l[1],
          build: l[2],
          platform: "Weapp",
          partner: ""
        },
        app: {
          versionCode: "1",
          versionName: "1.0.0",
          installTime: 0,
          displayName: "",
          appKey: "",
          uniqueId: "wxAppId",
          channel: ""
        },
        device: {
          type: "mobile",
          softwareConfig: {},
          hardwareConfig: {},
          deviceId: {}
        },
        networks: [{
          type: "wifi",
          available: false,
          connected: false
        }, {
          type: "cellular",
          available: false,
          connected: false,
          current: []
        }, {
          type: "unknown",
          available: false,
          connected: false
        }],
        locations: [{}],
        appContext: {}
      };
      (function (t) {
        function e(t, e, o, i) {
          var r = e && e.prototype instanceof n ? e : n;
          var a = Object.create(r.prototype);
          var s = new h(i || []);
          a._invoke = l(t, o, s);
          return a;
        }
        function o(t, e, o) {
          try {
            return {
              type: "normal",
              arg: t.call(e, o)
            };
          } catch (t) {
            return {
              type: "throw",
              arg: t
            };
          }
        }
        function n() {}
        function i() {}
        function r() {}
        function s(t) {
          ["next", "throw", "return"].forEach(function (e) {
            t[e] = function (t) {
              return this._invoke(e, t);
            };
          });
        }
        function c(t) {
          function e(n, i, r, s) {
            var c = o(t[n], t, i);
            if ("throw" !== c.type) {
              var l = c.arg;
              var u = l.value;
              if (u && "object" === (undefined === u ? "undefined" : a(u)) && m.call(u, "__await")) {
                return Promise.resolve(u.__await).then(function (t) {
                  e("next", t, r, s);
                }, function (t) {
                  e("throw", t, r, s);
                });
              } else {
                return Promise.resolve(u).then(function (t) {
                  l.value = t;
                  r(l);
                }, function (t) {
                  return e("throw", t, r, s);
                });
              }
            }
            s(c.arg);
          }
          var n;
          this._invoke = function (t, o) {
            function i() {
              return new Promise(function (n, i) {
                e(t, o, n, i);
              });
            }
            return n = n ? n.then(i, i) : i();
          };
        }
        function l(t, e, n) {
          var i = P;
          return function (r, a) {
            if (i === C) {
              throw new Error("Generator is already running");
            }
            if (i === N) {
              if ("throw" === r) {
                throw a;
              }
              return y();
            }
            n.method = r;
            for (n.arg = a;;) {
              var s = n.delegate;
              if (s) {
                var c = u(s, n);
                if (c) {
                  if (c === A) {
                    continue;
                  }
                  return c;
                }
              }
              if ("next" === n.method) {
                n.sent = n._sent = n.arg;
              } else if ("throw" === n.method) {
                if (i === P) {
                  throw i = N, n.arg;
                }
                n.dispatchException(n.arg);
              } else {
                "return" === n.method && n.abrupt("return", n.arg);
              }
              i = C;
              var l = o(t, e, n);
              if ("normal" === l.type) {
                i = n.done ? N : O;
                if (l.arg === A) {
                  continue;
                }
                return {
                  value: l.arg,
                  done: n.done
                };
              }
              if ("throw" === l.type) {
                i = N;
                n.method = "throw";
                n.arg = l.arg;
              }
            }
          };
        }
        function u(t, e) {
          var n = t.iterator[e.method];
          if (n === g) {
            e.delegate = null;
            if ("throw" === e.method) {
              if (t.iterator.return && (e.method = "return", e.arg = g, u(t, e), "throw" === e.method)) {
                return A;
              }
              e.method = "throw";
              e.arg = new TypeError("The iterator does not provide a 'throw' method");
            }
            return A;
          }
          var i = o(n, t.iterator, e.arg);
          if ("throw" === i.type) {
            e.method = "throw";
            e.arg = i.arg;
            e.delegate = null;
            return A;
          }
          var r = i.arg;
          if (r) {
            if (r.done) {
              e[t.resultName] = r.value;
              e.next = t.nextLoc;
              if ("return" !== e.method) {
                e.method = "next";
                e.arg = g;
              }
              e.delegate = null;
              return A;
            } else {
              return r;
            }
          } else {
            e.method = "throw";
            e.arg = new TypeError("iterator result is not an object");
            e.delegate = null;
            return A;
          }
        }
        function p(t) {
          var e = {
            tryLoc: t[0]
          };
          1 in t && (e.catchLoc = t[1]);
          if (2 in t) {
            e.finallyLoc = t[2];
            e.afterLoc = t[3];
          }
          this.tryEntries.push(e);
        }
        function d(t) {
          var e = t.completion || {};
          e.type = "normal";
          delete e.arg;
          t.completion = e;
        }
        function h(t) {
          this.tryEntries = [{
            tryLoc: "root"
          }];
          t.forEach(p, this);
          this.reset(true);
        }
        function f(t) {
          if (t) {
            var e = t[S];
            if (e) {
              return e.call(t);
            }
            if ("function" == typeof t.next) {
              return t;
            }
            if (!isNaN(t.length)) {
              var o = -1;
              var n = function e() {
                for (; ++o < t.length;) {
                  if (m.call(t, o)) {
                    e.value = t[o];
                    e.done = false;
                    return e;
                  }
                }
                e.value = g;
                e.done = true;
                return e;
              };
              return n.next = n;
            }
          }
          return {
            next: y
          };
        }
        function y() {
          return {
            value: g,
            done: true
          };
        }
        var g;
        var v = Object.prototype;
        var m = v.hasOwnProperty;
        var _ = "function" == typeof Symbol ? Symbol : {};
        var S = _.iterator || "@@iterator";
        var b = _.asyncIterator || "@@asyncIterator";
        var w = _.toStringTag || "@@toStringTag";
        t.wrap = e;
        var P = "suspendedStart";
        var O = "suspendedYield";
        var C = "executing";
        var N = "completed";
        var A = {};
        var M = {};
        M[S] = function () {
          return this;
        };
        var I = Object.getPrototypeOf;
        var T = I && I(I(f([])));
        T && T !== v && m.call(T, S) && (M = T);
        var D = r.prototype = n.prototype = Object.create(M);
        i.prototype = D.constructor = r;
        r.constructor = i;
        r[w] = i.displayName = "GeneratorFunction";
        t.isGeneratorFunction = function (t) {
          var e = "function" == typeof t && t.constructor;
          return !!e && (e === i || "GeneratorFunction" === (e.displayName || e.name));
        };
        t.mark = function (t) {
          if (Object.setPrototypeOf) {
            Object.setPrototypeOf(t, r);
          } else {
            t.__proto__ = r;
            w in t || (t[w] = "GeneratorFunction");
          }
          t.prototype = Object.create(D);
          return t;
        };
        t.awrap = function (t) {
          return {
            __await: t
          };
        };
        s(c.prototype);
        c.prototype[b] = function () {
          return this;
        };
        t.AsyncIterator = c;
        t.async = function (o, n, i, r) {
          var a = new c(e(o, n, i, r));
          if (t.isGeneratorFunction(n)) {
            return a;
          } else {
            return a.next().then(function (t) {
              if (t.done) {
                return t.value;
              } else {
                return a.next();
              }
            });
          }
        };
        s(D);
        D[w] = "Generator";
        D[S] = function () {
          return this;
        };
        D.toString = function () {
          return "[object Generator]";
        };
        t.keys = function (t) {
          var e = [];
          for (var o in t) {
            e.push(o);
          }
          e.reverse();
          return function o() {
            for (; e.length;) {
              var n = e.pop();
              if (n in t) {
                o.value = n;
                o.done = false;
                return o;
              }
            }
            o.done = true;
            return o;
          };
        };
        t.values = f;
        h.prototype = {
          constructor: h,
          reset(t) {
            this.prev = 0;
            this.next = 0;
            this.sent = this._sent = g;
            this.done = false;
            this.delegate = null;
            this.method = "next";
            this.arg = g;
            this.tryEntries.forEach(d);
            if (!t) {
              for (var e in this) {
                "t" === e.charAt(0) && m.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = g);
              }
            }
          },
          stop() {
            this.done = true;
            var t = this.tryEntries[0].completion;
            if ("throw" === t.type) {
              throw t.arg;
            }
            return this.rval;
          },
          dispatchException(t) {
            function e(e, n) {
              r.type = "throw";
              r.arg = t;
              o.next = e;
              if (n) {
                o.method = "next";
                o.arg = g;
              }
              return !!n;
            }
            if (this.done) {
              throw t;
            }
            var o = this;
            for (var n = this.tryEntries.length - 1; n >= 0; --n) {
              var i = this.tryEntries[n];
              var r = i.completion;
              if ("root" === i.tryLoc) {
                return e("end");
              }
              if (i.tryLoc <= this.prev) {
                var a = m.call(i, "catchLoc");
                var s = m.call(i, "finallyLoc");
                if (a && s) {
                  if (this.prev < i.catchLoc) {
                    return e(i.catchLoc, true);
                  }
                  if (this.prev < i.finallyLoc) {
                    return e(i.finallyLoc);
                  }
                } else if (a) {
                  if (this.prev < i.catchLoc) {
                    return e(i.catchLoc, true);
                  }
                } else {
                  if (!s) {
                    throw new Error("try statement without catch or finally");
                  }
                  if (this.prev < i.finallyLoc) {
                    return e(i.finallyLoc);
                  }
                }
              }
            }
          },
          abrupt(t, e) {
            for (var o = this.tryEntries.length - 1; o >= 0; --o) {
              var n = this.tryEntries[o];
              if (n.tryLoc <= this.prev && m.call(n, "finallyLoc") && this.prev < n.finallyLoc) {
                var i = n;
                break;
              }
            }
            i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
            var r = i ? i.completion : {};
            r.type = t;
            r.arg = e;
            if (i) {
              this.method = "next";
              this.next = i.finallyLoc;
              return A;
            } else {
              return this.complete(r);
            }
          },
          complete(t, e) {
            if ("throw" === t.type) {
              throw t.arg;
            }
            if ("break" === t.type || "continue" === t.type) {
              this.next = t.arg;
            } else if ("return" === t.type) {
              this.rval = this.arg = t.arg;
              this.method = "return";
              this.next = "end";
            } else {
              "normal" === t.type && e && (this.next = e);
            }
            return A;
          },
          finish(t) {
            for (var e = this.tryEntries.length - 1; e >= 0; --e) {
              var o = this.tryEntries[e];
              if (o.finallyLoc === t) {
                this.complete(o.completion, o.afterLoc);
                d(o);
                return A;
              }
            }
          },
          catch: function _catch(t) {
            for (var e = this.tryEntries.length - 1; e >= 0; --e) {
              var o = this.tryEntries[e];
              if (o.tryLoc === t) {
                var n = o.completion;
                if ("throw" === n.type) {
                  var i = n.arg;
                  d(o);
                }
                return i;
              }
            }
            throw new Error("illegal catch attempt");
          },
          delegateYield(t, e, o) {
            this.delegate = {
              iterator: f(t),
              resultName: e,
              nextLoc: o
            };
            "next" === this.method && (this.arg = g);
            return A;
          }
        };
      })("object" === a(t) ? t.exports : {});
      var d = function t(e, o, n) {
        function i(a) {
          if (!o[a]) {
            if (!e[a]) {
              if (r) {
                return r(a, true);
              }
              var s = new Error("Cannot find module '" + a + "'");
              throw s.code = "MODULE_NOT_FOUND", s;
            }
            var c = o[a] = {
              exports: {}
            };
            e[a][0].call(c.exports, function (t) {
              return i(e[a][1][t] || t);
            }, c, c.exports, t, e, o, n);
          }
          return o[a].exports;
        }
        var r = undefined;
        for (var a = 0; a < n.length; a++) {
          i(n[a]);
        }
        return i;
      }({
        1: [function (t, e) {
          function o() {
            l = false;
            if (a.length) {
              c = a.concat(c);
            } else {
              u = -1;
            }
            c.length && n();
          }
          function n() {
            if (!l) {
              var t = setTimeout(o);
              l = true;
              for (var e = c.length; e;) {
                a = c;
                for (c = []; ++u < e;) {
                  a && a[u].run();
                }
                u = -1;
                e = c.length;
              }
              a = null;
              l = false;
              clearTimeout(t);
            }
          }
          function i(t, e) {
            this.fun = t;
            this.array = e;
          }
          function r() {}
          var a;
          var s = e.exports = {};
          var c = [];
          var l = false;
          var u = -1;
          s.nextTick = function (t) {
            var e = new Array(arguments.length - 1);
            if (arguments.length > 1) {
              for (var o = 1; o < arguments.length; o++) {
                e[o - 1] = arguments[o];
              }
            }
            c.push(new i(t, e));
            1 !== c.length || l || setTimeout(n, 0);
          };
          i.prototype.run = function () {
            this.fun.apply(null, this.array);
          };
          s.title = "browser";
          s.browser = true;
          s.env = {};
          s.argv = [];
          s.version = "";
          s.versions = {};
          s.on = r;
          s.addListener = r;
          s.once = r;
          s.off = r;
          s.removeListener = r;
          s.removeAllListeners = r;
          s.emit = r;
          s.binding = function () {
            throw new Error("process.binding is not supported");
          };
          s.cwd = function () {
            return "/";
          };
          s.chdir = function () {
            throw new Error("process.chdir is not supported");
          };
          s.umask = function () {
            return 0;
          };
        }, {}],
        2: [function (t, e) {
          function o(t) {
            i = function (t) {
              var e = [].concat(function (t) {
                if (Array.isArray(t)) {
                  var e = 0;
                  for (var o = Array(t.length); e < t.length; e++) {
                    o[e] = t[e];
                  }
                  return o;
                }
                return Array.from(t);
              }(Array(256).keys()));
              var o = 0;
              t = function (t) {
                var e = [];
                var o = 0;
                for (var n = t.length; n > o; o++) {
                  e.push(t.charCodeAt(o));
                }
                return e;
              }(t);
              var n = 0;
              for (var i = e.length; i > n; n++) {
                var r = [e[o = (o + e[n] + t[n % t.length]) % 256], e[n]];
                e[n] = r[0];
                e[o] = r[1];
              }
              return e;
            }(t);
          }
          var i = "";
          var r = n().mark(function t(e) {
            var o;
            var i;
            var r;
            return n().wrap(function (t) {
              for (;;) {
                switch (t.prev = t.next) {
                  case 0:
                    o = 0;
                    i = 0;
                  case 1:
                    i = (i + e[o = (o + 1) % 256]) % 256;
                    r = [e[i], e[o]];
                    e[o] = r[0];
                    e[i] = r[1];
                    t.next = 9;
                    return e[(e[o] + e[i]) % 256];
                  case 9:
                    t.next = 1;
                    break;
                  case 11:
                  case "end":
                    return t.stop();
                }
              }
            }, t, this);
          });
          o.prototype.encrypt = function (t) {
            var e = function (t) {
              var e;
              var o;
              var n = new Array();
              e = t.length;
              for (var i = 0; i < e; i++) {
                if ((o = t.charCodeAt(i)) >= 65536 && o <= 1114111) {
                  n.push(o >> 18 & 7 | 240);
                  n.push(o >> 12 & 63 | 128);
                  n.push(o >> 6 & 63 | 128);
                  n.push(63 & o | 128);
                } else if (o >= 2048 && o <= 65535) {
                  n.push(o >> 12 & 15 | 224);
                  n.push(o >> 6 & 63 | 128);
                  n.push(63 & o | 128);
                } else if (o >= 128 && o <= 2047) {
                  n.push(o >> 6 & 31 | 192);
                  n.push(63 & o | 128);
                } else {
                  n.push(255 & o);
                }
              }
              return n;
            }(t);
            var o = e.length;
            var n = new ArrayBuffer(o);
            var a = r(i.slice(0));
            var s = new Int8Array(n);
            for (var c = 0; o > c; c++) {
              s[c] = e[c] ^ a.next().value;
            }
            return s;
          };
          o.prototype.decrypt = function (t) {
            var e = "";
            var o = r(i.slice(0));
            var n = 0;
            for (var a = (t = t.match(/[a-z0-9]{2}/gi)).length; a > n; n++) {
              e += String.fromCharCode(parseInt(t[n], 16) ^ o.next().value);
            }
            return e;
          };
          e.exports = o;
        }, {}],
        3: [function (t, e) {
          (function (t, o) {
            function n(t) {
              if (t && "undefined" != typeof Symbol && t.constructor === Symbol) {
                return "symbol";
              } else if (undefined === t) {
                return "undefined";
              } else {
                return a(t);
              }
            }
            !function (o) {
              function i(t, e, o, n) {
                var i = Object.create((e || a).prototype);
                var r = new y(n || []);
                i._invoke = d(t, o, r);
                return i;
              }
              function r(t, e, o) {
                try {
                  return {
                    type: "normal",
                    arg: t.call(e, o)
                  };
                } catch (t) {
                  return {
                    type: "throw",
                    arg: t
                  };
                }
              }
              function a() {}
              function s() {}
              function c() {}
              function l(t) {
                ["next", "throw", "return"].forEach(function (e) {
                  t[e] = function (t) {
                    return this._invoke(e, t);
                  };
                });
              }
              function u(t) {
                this.arg = t;
              }
              function p(e) {
                function o(t, o) {
                  var n = e[t](o);
                  var i = n.value;
                  if (i instanceof u) {
                    return Promise.resolve(i.arg).then(r, a);
                  } else {
                    return Promise.resolve(i).then(function (t) {
                      n.value = t;
                      return n;
                    });
                  }
                }
                "object" === (undefined === t ? "undefined" : n(t)) && t.domain && (o = t.domain.bind(o));
                var i;
                var r = o.bind(e, "next");
                var a = o.bind(e, "throw");
                o.bind(e, "return");
                this._invoke = function (t, e) {
                  function n() {
                    return o(t, e);
                  }
                  return i = i ? i.then(n, n) : new Promise(function (t) {
                    t(n());
                  });
                };
              }
              function d(t, e, o) {
                var n = P;
                return function (i, a) {
                  if (n === C) {
                    throw new Error("Generator is already running");
                  }
                  if (n === N) {
                    if ("throw" === i) {
                      throw a;
                    }
                    return v();
                  }
                  for (;;) {
                    var s = o.delegate;
                    if (s) {
                      if ("return" === i || "throw" === i && s.iterator[i] === m) {
                        o.delegate = null;
                        var c = s.iterator.return;
                        if (c && "throw" === (l = r(c, s.iterator, a)).type) {
                          i = "throw";
                          a = l.arg;
                          continue;
                        }
                        if ("return" === i) {
                          continue;
                        }
                      }
                      var l;
                      if ("throw" === (l = r(s.iterator[i], s.iterator, a)).type) {
                        o.delegate = null;
                        i = "throw";
                        a = l.arg;
                        continue;
                      }
                      i = "next";
                      a = m;
                      if (!(u = l.arg).done) {
                        n = O;
                        return u;
                      }
                      o[s.resultName] = u.value;
                      o.next = s.nextLoc;
                      o.delegate = null;
                    }
                    if ("next" === i) {
                      o._sent = a;
                      o.sent = n === O ? a : m;
                    } else if ("throw" === i) {
                      if (n === P) {
                        throw n = N, a;
                      }
                      if (o.dispatchException(a)) {
                        i = "next";
                        a = m;
                      }
                    } else {
                      "return" === i && o.abrupt("return", a);
                    }
                    n = C;
                    if ("normal" === (l = r(t, e, o)).type) {
                      n = o.done ? N : O;
                      var u = {
                        value: l.arg,
                        done: o.done
                      };
                      if (l.arg !== A) {
                        return u;
                      }
                      o.delegate && "next" === i && (a = m);
                    } else if ("throw" === l.type) {
                      n = N;
                      i = "throw";
                      a = l.arg;
                    }
                  }
                };
              }
              function h(t) {
                var e = {
                  tryLoc: t[0]
                };
                1 in t && (e.catchLoc = t[1]);
                if (2 in t) {
                  e.finallyLoc = t[2];
                  e.afterLoc = t[3];
                }
                this.tryEntries.push(e);
              }
              function f(t) {
                var e = t.completion || {};
                e.type = "normal";
                delete e.arg;
                t.completion = e;
              }
              function y(t) {
                this.tryEntries = [{
                  tryLoc: "root"
                }];
                t.forEach(h, this);
                this.reset(true);
              }
              function g(t) {
                if (t) {
                  var e = t[S];
                  if (e) {
                    return e.call(t);
                  }
                  if ("function" == typeof t.next) {
                    return t;
                  }
                  if (!isNaN(t.length)) {
                    var o = -1;
                    var n = function e() {
                      for (; ++o < t.length;) {
                        if (_.call(t, o)) {
                          e.value = t[o];
                          e.done = false;
                          return e;
                        }
                      }
                      e.value = m;
                      e.done = true;
                      return e;
                    };
                    return n.next = n;
                  }
                }
                return {
                  next: v
                };
              }
              function v() {
                return {
                  value: m,
                  done: true
                };
              }
              var m;
              var _ = Object.prototype.hasOwnProperty;
              var S = "function" == typeof Symbol && Symbol.iterator || "@@iterator";
              var b = "object" === (undefined === e ? "undefined" : n(e));
              var w = o.regeneratorRuntime;
              if (w) {
                b && (e.exports = w);
              } else {
                (w = o.regeneratorRuntime = b ? e.exports : {}).wrap = i;
                var P = "suspendedStart";
                var O = "suspendedYield";
                var C = "executing";
                var N = "completed";
                var A = {};
                var M = c.prototype = a.prototype;
                s.prototype = M.constructor = c;
                c.constructor = s;
                s.displayName = "GeneratorFunction";
                w.isGeneratorFunction = function (t) {
                  var e = "function" == typeof t && t.constructor;
                  return !!e && (e === s || "GeneratorFunction" === (e.displayName || e.name));
                };
                w.mark = function (t) {
                  if (Object.setPrototypeOf) {
                    Object.setPrototypeOf(t, c);
                  } else {
                    t.__proto__ = c;
                  }
                  t.prototype = Object.create(M);
                  return t;
                };
                w.awrap = function (t) {
                  return new u(t);
                };
                l(p.prototype);
                w.async = function (t, e, o, n) {
                  var r = new p(i(t, e, o, n));
                  if (w.isGeneratorFunction(e)) {
                    return r;
                  } else {
                    return r.next().then(function (t) {
                      if (t.done) {
                        return t.value;
                      } else {
                        return r.next();
                      }
                    });
                  }
                };
                l(M);
                M[S] = function () {
                  return this;
                };
                M.toString = function () {
                  return "[object Generator]";
                };
                w.keys = function (t) {
                  var e = [];
                  for (var o in t) {
                    e.push(o);
                  }
                  e.reverse();
                  return function o() {
                    for (; e.length;) {
                      var n = e.pop();
                      if (n in t) {
                        o.value = n;
                        o.done = false;
                        return o;
                      }
                    }
                    o.done = true;
                    return o;
                  };
                };
                w.values = g;
                y.prototype = {
                  constructor: y,
                  reset(t) {
                    this.prev = 0;
                    this.next = 0;
                    this.sent = m;
                    this.done = false;
                    this.delegate = null;
                    this.tryEntries.forEach(f);
                    if (!t) {
                      for (var e in this) {
                        "t" === e.charAt(0) && _.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = m);
                      }
                    }
                  },
                  stop() {
                    this.done = true;
                    var t = this.tryEntries[0].completion;
                    if ("throw" === t.type) {
                      throw t.arg;
                    }
                    return this.rval;
                  },
                  dispatchException(t) {
                    function e(e, n) {
                      r.type = "throw";
                      r.arg = t;
                      o.next = e;
                      return !!n;
                    }
                    if (this.done) {
                      throw t;
                    }
                    var o = this;
                    for (var n = this.tryEntries.length - 1; n >= 0; --n) {
                      var i = this.tryEntries[n];
                      var r = i.completion;
                      if ("root" === i.tryLoc) {
                        return e("end");
                      }
                      if (i.tryLoc <= this.prev) {
                        var a = _.call(i, "catchLoc");
                        var s = _.call(i, "finallyLoc");
                        if (a && s) {
                          if (this.prev < i.catchLoc) {
                            return e(i.catchLoc, true);
                          }
                          if (this.prev < i.finallyLoc) {
                            return e(i.finallyLoc);
                          }
                        } else if (a) {
                          if (this.prev < i.catchLoc) {
                            return e(i.catchLoc, true);
                          }
                        } else {
                          if (!s) {
                            throw new Error("try statement without catch or finally");
                          }
                          if (this.prev < i.finallyLoc) {
                            return e(i.finallyLoc);
                          }
                        }
                      }
                    }
                  },
                  abrupt(t, e) {
                    for (var o = this.tryEntries.length - 1; o >= 0; --o) {
                      var n = this.tryEntries[o];
                      if (n.tryLoc <= this.prev && _.call(n, "finallyLoc") && this.prev < n.finallyLoc) {
                        var i = n;
                        break;
                      }
                    }
                    i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
                    var r = i ? i.completion : {};
                    r.type = t;
                    r.arg = e;
                    if (i) {
                      this.next = i.finallyLoc;
                    } else {
                      this.complete(r);
                    }
                    return A;
                  },
                  complete(t, e) {
                    if ("throw" === t.type) {
                      throw t.arg;
                    }
                    if ("break" === t.type || "continue" === t.type) {
                      this.next = t.arg;
                    } else if ("return" === t.type) {
                      this.rval = t.arg;
                      this.next = "end";
                    } else {
                      "normal" === t.type && e && (this.next = e);
                    }
                  },
                  finish(t) {
                    for (var e = this.tryEntries.length - 1; e >= 0; --e) {
                      var o = this.tryEntries[e];
                      if (o.finallyLoc === t) {
                        this.complete(o.completion, o.afterLoc);
                        f(o);
                        return A;
                      }
                    }
                  },
                  catch: function _catch(t) {
                    for (var e = this.tryEntries.length - 1; e >= 0; --e) {
                      var o = this.tryEntries[e];
                      if (o.tryLoc === t) {
                        var n = o.completion;
                        if ("throw" === n.type) {
                          var i = n.arg;
                          f(o);
                        }
                        return i;
                      }
                    }
                    throw new Error("illegal catch attempt");
                  },
                  delegateYield(t, e, o) {
                    this.delegate = {
                      iterator: g(t),
                      resultName: e,
                      nextLoc: o
                    };
                    return A;
                  }
                };
              }
            }("object" === (undefined === o ? "undefined" : n(o)) ? o : "object" === ("undefined" == typeof window ? "undefined" : n(window)) ? window : "object" === ("undefined" == typeof self ? "undefined" : n(self)) ? self : undefined);
          }).call(this, t("_process"), undefined !== o.g ? o.g : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
        }, {
          _process: 1
        }],
        4: [function (t, e) {
          e.exports = {
            full: "1.2.0",
            major: "1",
            minor: "2",
            dot: "0"
          };
        }, {}]
      }, {}, [2])(2);
      var h = {
        firstInit: false,
        initTime: 0,
        sessionId: "",
        sessionStartTime: 0,
        appLaunchInfo: null,
        sendFailTimes: 0,
        bakData: {},
        Store: {
          set(t, e) {
            try {
              zs.setStorageSync("TDSDK_" + t, e);
            } catch (t) {}
            h.bakData["TDSDK_" + t] = e;
          },
          get(t) {
            var e = null;
            try {
              e = zs.getStorageSync("TDSDK_" + t);
            } catch (t) {}
            e || (e = h.bakData["TDSDK_" + t] || null);
            return e;
          },
          remove(t) {
            try {
              zs.removeStorageSync("TDSDK_" + t);
            } catch (t) {}
            delete h.bakData["TDSDK_" + t];
          },
          getInfo() {
            try {
              return zs.getStorageInfoSync() || {};
            } catch (t) {
              return {};
            }
          }
        },
        random() {
          var t = "";
          for (var e = 0; e < 12; e++) {
            t += "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".charAt(Math.floor(62 * Math.random()));
          }
          return t;
        },
        isNumber(t) {
          return "number" == typeof t && !isNaN(t);
        },
        timestamp() {
          return new Date().getTime();
        },
        deviceId() {
          return "weapp-" + this.timestamp() + "-" + this.random();
        },
        getEventId(t) {
          if (!t && !/0{1}/.test(t)) {
            return "";
          }
          var e = "";
          try {
            e = t.toString();
          } catch (o) {
            try {
              e = JSON.stringify(t);
            } catch (t) {}
          }
          return e.split(" ")[0].slice(0, 64);
        },
        addStoreData() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : [];
          var e = "EVENT_" + h.sessionId;
          var o = h.Store.get(e);
          o = o && o.length ? o.concat(t) : t;
          h.Store.set(e, o);
          if (o.length >= 30) {
            b.sessionContinue();
            b.startLoop();
          }
        },
        eventHandle() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : "";
          var e = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : {};
          if (t) {
            var o = {
              eventId: t,
              count: 1,
              startTime: h.timestamp()
            };
            if ("WeappShare" === t) {
              o.shareTickets = e.shareTickets;
              var n = {};
              n.user = h.deviceId;
              n.title = e.title;
              n.desc = e.desc;
              var i = e.path;
              if (i) {
                i = (i = h.getUrl("", h.getSearchParams(e.path))).substring(1);
              } else {
                console.log("分享事件的path参数缺少有效值");
              }
              n.path = i;
              o.params = n;
            }
            h.addStoreData([o]);
          }
        },
        getCacheData() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          var e = Object.keys(t);
          var o = [];
          var n = [];
          e.length && e.forEach(function (e) {
            var i = t[e];
            if (i && i.sendFail && i.data) {
              o = o.concat(i.data);
              n.push(e);
            }
          });
          return {
            data: o,
            keys: n
          };
        },
        sendCacheList: {},
        updateSendTime() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : [];
          var e = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 0;
          var o = p.device.deviceId;
          var n = h.Store.get("uid");
          var i = h.Store.get("deviceId");
          t.forEach(function (r, a) {
            if (!r.device.deviceId.tid && !r.device.deviceId.uid) {
              if (o.tid) {
                r.device.deviceId.tid = o.tid;
                if (o.uid) {
                  r.device.deviceId.uid = o.uid;
                  return true;
                }
              } else {
                if (o.uid) {
                  r.device.deviceId.uid = o.uid;
                  r.device.deviceId.tid = o.uid;
                  return true;
                }
                if (f.isWaitingForOpenid) {
                  if (n) {
                    r.device.deviceId.uid = n;
                    r.device.deviceId.tid = n;
                    o.uid = n;
                    o.tid = n;
                    return true;
                  }
                  if (i) {
                    r.device.deviceId.tid = i;
                    r.device.deviceId.uid = "";
                  } else {
                    var s = h.deviceId();
                    o.tid = s;
                    o.uid = "";
                    h.Store.set("deviceId", s);
                    r.device.deviceId.tid = s;
                    r.device.deviceId.uid = "";
                    f.shouldOverwriteTid = false;
                  }
                } else {
                  r.device.deviceId.tid = o.tid;
                  r.device.deviceId.uid = o.uid;
                }
              }
            }
            r.action && r.action.data && (t[a].action.data.start = e);
          });
          return t;
        },
        getRequestData() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : [];
          var e = JSON.parse(JSON.stringify(t));
          var o = h.sendCacheList;
          if (Object.keys(o).length) {
            var n = h.getCacheData(o);
            e = e.concat(n.data);
            n.keys.forEach(function (t) {
              return delete o[t];
            });
          }
          var i = e.length;
          if (i) {
            var r = [];
            if (i >= 30) {
              JSON.stringify(e).length > 61440 && r.push(e.splice(0, i / 2));
              r.push(e);
            } else {
              r.push(e);
            }
            r.forEach(function (t) {
              var e = h.timestamp();
              o[e] = {
                data: t,
                sendFail: false
              };
              var n = h.updateSendTime(t, h.timestamp());
              h.request(e, n);
            });
          }
        },
        handleData(t) {
          return new d("r5czusfu0wjcaz4pp01v2k7qte55xc25fngq4ylby2civ230vdy6uy6goz9w4kgfqjk31l8khfzfvbxj7emcprjyy8nngf0r9dvxzwbhm2uw7ljre52jt95lg0knyp8e5c4go44s3z5ciy58h0tuosmwhupa62rdnkeicgdba6w6f0kenp0xac7so8j1vdbjpqwyprx2ouenv22isustwnpltt9ui5plnijd4bq4013o3mzdkllozn26zwds9x38").encrypt(t);
        },
        request() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : 0;
          var e = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : [];
          var o = h.handleData(JSON.stringify(e));
          zs.request({
            url: "https://h5.udrig.com/app/wx/v1",
            data: o.buffer,
            header: {
              "content-type": "application/octet-stream",
              "decrypt-version": "v1.0.0"
            },
            method: "POST",
            success(e) {
              if (200 === e.statusCode) {
                delete h.sendCacheList[t];
                h.sendFailTimes = 0;
                if (!P.appIsHide) {
                  clearTimeout(b.timeout);
                  b.timeout = null;
                  b.startLoop();
                }
              }
            },
            fail() {
              if (P.appIsHide) {
                h.Store.set("RESEND_" + t, e);
                delete h.sendCacheList[t];
              } else {
                h.sendCacheList[t].sendFail = true;
                h.sendFailTimes < 5 && h.sendFailTimes++;
              }
            }
          });
        },
        getUrl() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : "";
          var e = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : {};
          var o = Object.keys(e).sort() || [];
          var n = o.length ? t + "?" : t;
          o.forEach(function (t, o) {
            0 !== o && (n += "&");
            n += t + "=" + e[t];
          });
          return n;
        },
        getSearchParams(t) {
          if (!t) {
            return {};
          }
          var e = {};
          t.split("&").forEach(function (t) {
            var o = t.split("=");
            2 === o.length && (e[o[0]] = o[1]);
          });
          return e;
        }
      };
      var f = {
        shouldOverwriteTid: true,
        isWaitingForOpenid: true,
        isFirst: true,
        init() {
          var t = this;
          var e = h.Store.get("deviceId");
          var o = h.Store.get("uid");
          if (o) {
            var n = e || o;
            t.setData(n, o);
          } else {
            new Promise(this.getOpenid).then(function (o) {
              var n = undefined;
              if (e) {
                n = e;
              } else {
                n = o;
                h.Store.set("deviceId", o);
              }
              t.setData(n, o);
              h.Store.set("uid", o);
              f.isWaitingForOpenid = false;
            }).catch(function () {
              var o;
              o = e || h.deviceId();
              t.setData(o, "");
              f.shouldOverwriteTid && h.Store.set("deviceId", o);
              f.isWaitingForOpenid = false;
            });
          }
        },
        setData(t, e) {
          if (f.shouldOverwriteTid) {
            p.device.deviceId = {
              tid: t,
              uid: e
            };
          } else {
            p.device.deviceId.uid = e;
          }
          u.uid = false;
          b.getAppProfile();
        },
        getOpenid(t) {
          if (s) {
            t(s);
          } else {
            c.push(t);
          }
        },
        reGetOpenid(t, e) {
          f.isFirst = false;
          f.getOpenid(t, e);
        }
      };
      var y = {
        placeOrder: {
          domain: "iap",
          name: "placeOrder"
        },
        orderPaySucc: {
          domain: "iap",
          name: "pay"
        },
        cancelOrder: {
          domain: "iap",
          name: "cancelOrder"
        },
        register: {
          domain: "account",
          name: "register"
        },
        login: {
          domain: "account",
          name: "login"
        },
        update: {
          domain: "account",
          name: "update"
        }
      };
      var g = {
        sendTime: 0,
        statusType() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          var e = [];
          var o = JSON.parse(JSON.stringify(p));
          var n = {
            domain: t.domain,
            name: t.name,
            data: t.data
          };
          o.ts = t.data.start || h.timestamp();
          o.action = n;
          e.push(o);
          h.getRequestData(e);
        },
        dataType(t, e) {
          var o = this.getStoreList(t, e);
          h.getRequestData(o);
        },
        getEventType() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          var e = y[t.domainName];
          if (e) {
            return e;
          }
          if (t.pageEvent) {
            return {
              domain: "page",
              name: "leave"
            };
          }
          if (t.eventId) {
            var o = {};
            switch (t.eventId) {
              case "WeappShare":
                o = {
                  domain: "user",
                  name: "share"
                };
                break;
              case "WeappPullDownRefresh":
                o = {
                  domain: "page",
                  name: "pullDownRefresh"
                };
                break;
              case "WeappReachBottom":
                o = {
                  domain: "page",
                  name: "reachBottom"
                };
                break;
              default:
                o = {
                  domain: "appEvent",
                  name: ""
                };
            }
            return o;
          }
        },
        getStoreList(t, e) {
          var o = this;
          var n = [];
          var i = t || h.sessionId;
          var r = JSON.stringify(p);
          var a = h.Store.get("EVENT_" + i);
          if (a && a.length) {
            a.forEach(function (t) {
              var i = o.getEventType(t);
              var a = JSON.parse(r);
              e && a.appContext && (a.appContext.sessionStartTime = e);
              var s = JSON.parse(JSON.stringify(t));
              s.pageEvent && delete s.pageEvent;
              s.domainName || (s.status = 2);
              s.domainName && delete s.domainName;
              var c = {
                domain: i.domain,
                name: i.name,
                data: s
              };
              a.ts = s.startTime ? s.startTime : h.timestamp();
              a.action = c;
              n.push(a);
            });
            h.Store.remove("EVENT_" + i);
          }
          return n;
        }
      };
      var v = {
        handleData() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          var e = arguments[1];
          var o = function (t) {
            var e = {};
            var o = h.Store.get("account") || {};
            "update" !== t && "setProfile" !== t || (e = o || {});
            return {
              getInfo() {
                return e;
              },
              setId(t) {
                if ("string" != typeof t || "" === t) {
                  return "accountId 类型错误";
                }
                if (t === o.accountId) {
                  e = o;
                } else {
                  e.accountId = t;
                }
              },
              setName(t) {
                if ("string" != typeof t) {
                  return "profile name 类型错误";
                }
                e.name = t;
              },
              setAge(t) {
                if (!h.isNumber(t)) {
                  return "profile age 类型错误";
                }
                e.age = t;
              },
              setGender(t) {
                var o = Number(t);
                if (0 !== o && 1 !== o && 2 !== o) {
                  return "profile gender 类型错误";
                }
                e.gender = o;
              },
              setType(t) {
                var o = Number(t);
                if (!(h.isNumber(o) && /^[0-9][0-9]*$/.test(o) && (o >= 0 && o <= 6 || o >= 11 && o <= 20))) {
                  return "account type 类型错误";
                }
                e.type = o;
              },
              setProperty(t, o) {
                if (!h.isNumber(o) && "string" != typeof o) {
                  return "profile " + t + " 类型错误";
                }
                e[t] = o;
              }
            };
          }(e);
          var n = {
            name: "setName",
            gender: "setGender",
            age: "setAge",
            accountType: "setType"
          };
          var i = false;
          var r = new RegExp("^property[1-9]$");
          if (t.accountId && "update" !== e && "setProfile" !== e) {
            var a = o.setId(t.accountId);
            if (a) {
              i = true;
              return console.error(a);
            }
          }
          Object.keys(t).forEach(function (e) {
            if (!i) {
              var a = t[e];
              var s = n[e];
              if (s) {
                var c = o[s](a);
                if (c) {
                  i = true;
                  return console.error(c);
                }
              } else if (r.test(e) || "property10" === e) {
                var l = o.setProperty(e, a);
                if (l) {
                  i = true;
                  return console.error(l);
                }
              }
            }
          });
          if (!i) {
            var s = o.getInfo();
            v.updateAccountInfo("account", s);
            if ("register" === e || "login" === e || "update" === e) {
              var c = Object.assign({
                domainName: e
              }, t);
              h.addStoreData([c]);
            }
          }
        },
        updateAccountInfo(t, e) {
          h.Store.set(t, e);
          v.assignAccount(e);
        },
        setAccountInfo(t) {
          var e = h.Store.get(t);
          "[object Object]" === Object.prototype.toString.call(e) && v.assignAccount(e);
        },
        assignAccount(t) {
          p.appContext.account = t;
        }
      };
      var m = {
        register() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          if (t.accountId) {
            if (t.accountType || 0 === t.accountType) {
              return void v.handleData(t, "register");
            } else {
              return console.error("Register事件缺少accountType字段");
            }
          } else {
            return console.error("Register事件缺少accountId字段");
          }
        },
        login() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          if (t.accountId) {
            if (t.accountType || 0 === t.accountType) {
              return void v.handleData(t, "login");
            } else {
              return console.error("Login事件缺少accountType字段");
            }
          } else {
            return console.error("Login事件缺少accountId字段");
          }
        },
        update() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          v.handleData(t, "update");
        }
      };
      var _ = {
        placeOrder(t) {
          if (!r(t)) {
            return false;
          }
          var e = {
            orderId: t.orderId,
            amount: t.amount,
            currencyType: t.currencyType,
            domainName: "placeOrder"
          };
          h.addStoreData([e]);
        },
        orderPaySucc(t) {
          if (!r(t, true)) {
            return false;
          }
          var e = {
            orderId: t.orderId,
            amount: t.amount,
            currencyType: t.currencyType,
            payType: t.paymentType,
            domainName: "orderPaySucc"
          };
          h.addStoreData([e]);
        },
        cancelOrder(t) {
          if (!r(t)) {
            return false;
          }
          var e = {
            orderId: t.orderId,
            amount: t.amount,
            currencyType: t.currencyType,
            domainName: "cancelOrder"
          };
          h.addStoreData([e]);
        }
      };
      var S = false;
      var b = {
        timeout: null,
        init(t) {
          p.app.versionCode = t.versionCode || "1";
          p.app.versionName = t.versionName;
          p.app.displayName = t.displayName || "";
          p.app.appKey = t.appKey || "";
          p.app.channel = t.channel || "";
          var e = zs.getLaunchOptionsSync();
          h.appLaunchInfo = JSON.parse(JSON.stringify(e));
          h.appLaunchInfo.scene = e.scene ? e.scene.toString() : "";
          f.init();
          b.judgeRequireData();
          b.getLocalParams();
          b.getSystemInfo();
          b.getNetwork();
        },
        launchRequest() {
          g.statusType({
            domain: "app",
            name: "init",
            data: {
              first: true
            }
          });
        },
        sessionStart(t) {
          var e = h.appLaunchInfo || {};
          var o = {
            status: 1,
            duration: 0,
            name: e.path,
            scene: e.scene,
            query: e.query || {},
            shareTicket: e.shareTicket,
            referrerInfo: e.referrerInfo
          };
          t && b.setNewSession();
          o.start = h.Store.get("session_time") || h.timestamp();
          o.url = h.getUrl(o.name, o.query);
          g.statusType({
            domain: "session",
            name: "begin",
            data: o
          });
        },
        sessionContinue() {
          g.dataType();
        },
        sessionEnd() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          var e = {
            status: 3,
            start: t.startTime,
            duration: t.duration
          };
          g.statusType({
            domain: "session",
            name: "end",
            data: e
          });
        },
        sendTmpSession() {
          b.sessionContinue();
          b.startLoop();
        },
        startLoop() {
          if (b.timeout) {
            clearTimeout(b.timeout);
            b.timeout = null;
          }
          var t = 3e3 * (h.sendFailTimes + 1);
          b.timeout = setTimeout(function () {
            b.sendTmpSession();
          }, t);
        },
        judgeRequireData() {
          if (!p.app.appKey) {
            p.app.appKey = "";
            console.error("请填写您在TalkingData申请的App ID");
          }
          if (!p.app.displayName) {
            p.app.displayName = "appname";
            console.error("请填写您的小程序名称");
          }
        },
        getLocalParams() {
          var t = h.Store.get("initTime");
          if (t) {
            h.initTime = t;
          } else {
            h.initTime = h.timestamp();
            h.Store.set("initTime", h.initTime);
            h.firstInit = true;
          }
          p.app.installTime = h.initTime;
          v && v.setAccountInfo("account");
          b.setNewSession();
        },
        setNewSession() {
          h.sessionId = h.deviceId();
          h.sessionStartTime = h.timestamp();
          h.Store.set("session_time", h.sessionStartTime);
          p.appContext.sessionId = h.sessionId;
          p.appContext.sessionStartTime = h.sessionStartTime;
        },
        getLaunchInfo() {
          var t = JSON.parse(JSON.stringify(b.launchOptions));
          t.type = "appLaunch";
          return t;
        },
        getAppProfile() {
          if (!S) {
            var t = true;
            ["device", "network", "uid"].forEach(function (e) {
              u[e] && (t = false);
            });
            if (t) {
              S = true;
              this.startRequest();
            }
          }
        },
        startRequest() {
          h.firstInit && b.launchRequest();
          this.sessionStart();
          this.startLoop();
        },
        getLocation() {},
        getNetwork() {
          zs.getNetworkType({
            success(t) {
              var e = p.networks;
              var o = t.networkType;
              if ("wifi" === o) {
                e[0].available = true;
                e[0].connected = true;
              } else if ("unknown" === o) {
                e[2].available = true;
                e[2].connected = true;
              } else if ("none" !== o) {
                e[1].available = true;
                e[1].connected = true;
                e[1].current.push({
                  type: o
                });
              }
              u.network = false;
              b.getAppProfile();
            }
          });
        },
        getSystemInfo() {
          zs.getSystemInfo({
            success(t) {
              if (t.model || t.system || t.SDKVersion) {
                var e = {
                  model: t.model,
                  pixel: t.screenWidth + "*" + t.screenHeight + "*" + t.pixelRatio,
                  densityDpi: t.pixelRatio,
                  brand: t.brand
                };
                var o = {
                  os: t.system,
                  local: t.language,
                  language: "zh_CN",
                  osVersionCode: t.version,
                  timezone: -new Date().getTimezoneOffset() / 60,
                  mpVersion: t.SDKVersion
                };
                p.device.hardwareConfig = e;
                p.device.softwareConfig = o;
              }
              u.device = false;
              b.getAppProfile();
            }
          });
        }
      };
      var w = {
        init: b.init,
        setOpenId(t) {
          s = t;
          c.forEach(function (t) {
            return t(s);
          });
          c.length = 0;
        },
        event() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          var e = h.getEventId(t.id);
          if (e) {
            var o = {};
            o.eventId = e;
            o.label = h.getEventId(t.label);
            o.count = t.count || 1;
            o.params = t.params;
            o.startTime = h.timestamp();
            if (undefined !== t.value) {
              if ("number" != typeof t.value) {
                console.error('自定义事件"' + e + '"中value对应的值的类型需为Number类型');
              } else if (isNaN(t.value)) {
                console.error('自定义事件"' + e + '"中请输入有效的Number类型数值');
              } else {
                o.value = t.value;
                h.addStoreData([o]);
              }
            } else {
              h.addStoreData([o]);
            }
          }
        },
        share() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          h.eventHandle("WeappShare", t);
        },
        pullDownRefresh() {
          h.eventHandle("WeappPullDownRefresh");
        },
        reachBottom() {
          h.eventHandle("WeappReachBottom");
        },
        setProfile() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          v.handleData(t, "setProfile");
        },
        profile: m,
        iap: _
      };
      var P = {
        isHide2Show: false,
        appIsHide: false,
        show() {
          var t = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {};
          P.appIsHide = false;
          P.getlastTmpData();
          if (P.isHide2Show) {
            var e = h.Store.get("TMP_time_end_" + h.sessionId);
            var o = t.scene ? t.scene.toString() : "";
            if (t.scene && o === h.appLaunchInfo.scene) {
              if (h.timestamp() - e > 3e4) {
                P.sessionRestart(e);
              } else {
                h.Store.remove("TMP_time_end_" + h.sessionId);
              }
            } else {
              h.appLaunchInfo = JSON.parse(JSON.stringify(t));
              h.appLaunchInfo.scene = o;
              P.sessionRestart(e);
            }
            P.isHide2Show = false;
            b.startLoop();
          }
        },
        sessionRestart(t) {
          var e = h.Store.get("TMP_time_start_" + h.sessionId);
          var o = {
            startTime: e,
            duration: parseInt((t - e) / 1e3)
          };
          b.sessionEnd(o);
          h.Store.remove("TMP_time_start_" + h.sessionId);
          h.Store.remove("TMP_time_end_" + h.sessionId);
          h.Store.remove("session_time");
          b.sessionStart(true);
        },
        hide() {
          P.appIsHide = true;
          clearTimeout(b.timeout);
          b.timeout = null;
          b.sessionContinue();
          P.isHide2Show = true;
          h.Store.set("TMP_time_start_" + h.sessionId, h.Store.get("session_time"));
          h.Store.set("TMP_time_end_" + h.sessionId, h.timestamp());
        },
        getlastTmpData() {
          var t = [];
          var e = h.Store.getInfo().keys || [];
          var o = undefined;
          var n = undefined;
          if (e && e.length) {
            o = e.filter(function (t) {
              return t.indexOf("TDSDK_EVENT") > -1;
            });
            n = e.filter(function (t) {
              return t.indexOf("TDSDK_RESEND") > -1;
            });
          }
          if (o && o.length) {
            o.forEach(function (e) {
              var o = {};
              e.split("_")[2];
              o.id = e.split("_")[2];
              o.time = o.id.split("-")[1];
              t.push(o);
            });
            P.sendLastTmpData(t);
          }
          n && n.length && n.forEach(function (t) {
            zs.getStorage({
              key: t,
              success(e) {
                h.getRequestData(e.data);
                zs.removeStorageSync(t);
              }
            });
          });
        },
        sendLastTmpData() {
          (arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : []).forEach(function (t) {
            g.dataType(t.id, t.time);
          });
        }
      };
      window.tdAppSdk = w;
      zs.onShow(P.show);
      zs.onHide(P.hide);
    },
    572: function _(t, e) {
      Object.defineProperty(e, "__esModule", {
        value: true
      });
      e.HttpManager = undefined;
      var o = function () {
        function t() {
          this.config = {
            timeout: 5e3
          };
        }
        Object.defineProperty(t, "instance", {
          get() {
            null == this._instance && (this._instance = new t());
            return this._instance;
          },
          enumerable: false,
          configurable: true
        });
        t.prototype.request = function (t) {
          var e = this;
          if (!t.success) {
            return new Promise(function (o, n) {
              e._dealRequest(t, o, n);
            });
          }
          this._dealRequest(t, t.success, t.fail, t.complete);
        };
        t.prototype._dealRequest = function (t, e, o, n, i) {
          var r = this;
          undefined === i && (i = 0);
          zs.request({
            url: t.url,
            data: JSON.stringify(t.data),
            header: t.header,
            method: t.method || "POST",
            timeout: t.timeout || this.config.timeout,
            success(t) {
              null == e || e(t.data);
            },
            fail(a) {
              if (i < (t.retryTimes || 0)) {
                r._dealRequest(t, e, o, n, i + 1);
              } else {
                a.errCode = a.errCode || a.errno;
                null == o || o(a);
              }
            },
            complete() {
              i >= (t.retryTimes || 0) && (null == n || n());
            }
          });
        };
        t._instance = null;
        return t;
      }();
      e.HttpManager = o;
    },
    397: function _(t, e, o) {
      var n = this && this.__awaiter || function (t, e, o, n) {
        return new (o || (o = Promise))(function (i, r) {
          function a(t) {
            try {
              c(n.next(t));
            } catch (t) {
              r(t);
            }
          }
          function s(t) {
            try {
              c(n.throw(t));
            } catch (t) {
              r(t);
            }
          }
          function c(t) {
            var e;
            if (t.done) {
              i(t.value);
            } else {
              (e = t.value, e instanceof o ? e : new o(function (t) {
                t(e);
              })).then(a, s);
            }
          }
          c((n = n.apply(t, e || [])).next());
        });
      };
      var i = this && this.__generator || function (t, e) {
        var o;
        var n;
        var i;
        var r;
        var a = {
          label: 0,
          sent() {
            if (1 & i[0]) {
              throw i[1];
            }
            return i[1];
          },
          trys: [],
          ops: []
        };
        r = {
          next: s(0),
          throw: s(1),
          return: s(2)
        };
        "function" == typeof Symbol && (r[Symbol.iterator] = function () {
          return this;
        });
        return r;
        function s(s) {
          return function (c) {
            return function (s) {
              if (o) {
                throw new TypeError("Generator is already executing.");
              }
              for (; r && (r = 0, s[0] && (a = 0)), a;) {
                try {
                  o = 1;
                  if (n && (i = 2 & s[0] ? n.return : s[0] ? n.throw || ((i = n.return) && i.call(n), 0) : n.next) && !(i = i.call(n, s[1])).done) {
                    return i;
                  }
                  n = 0;
                  i && (s = [2 & s[0], i.value]);
                  switch (s[0]) {
                    case 0:
                    case 1:
                      i = s;
                      break;
                    case 4:
                      a.label++;
                      return {
                        value: s[1],
                        done: false
                      };
                    case 5:
                      a.label++;
                      n = s[1];
                      s = [0];
                      continue;
                    case 7:
                      s = a.ops.pop();
                      a.trys.pop();
                      continue;
                    default:
                      if (!((i = (i = a.trys).length > 0 && i[i.length - 1]) || 6 !== s[0] && 2 !== s[0])) {
                        a = 0;
                        continue;
                      }
                      if (3 === s[0] && (!i || s[1] > i[0] && s[1] < i[3])) {
                        a.label = s[1];
                        break;
                      }
                      if (6 === s[0] && a.label < i[1]) {
                        a.label = i[1];
                        i = s;
                        break;
                      }
                      if (i && a.label < i[2]) {
                        a.label = i[2];
                        a.ops.push(s);
                        break;
                      }
                      i[2] && a.ops.pop();
                      a.trys.pop();
                      continue;
                  }
                  s = e.call(t, a);
                } catch (t) {
                  s = [6, t];
                  n = 0;
                } finally {
                  o = i = 0;
                }
              }
              if (5 & s[0]) {
                throw s[1];
              }
              return {
                value: s[0] ? s[1] : undefined,
                done: true
              };
            }([s, c]);
          };
        }
      };
      Object.defineProperty(e, "__esModule", {
        value: true
      });
      e.ZSHttp = undefined;
      var r;
      var a = o(652);
      var s = o(997);
      var c = o(49);
      var l = o(572);
      !function (t) {
        t.LOGIN = "game/login";
        t.CONFIG = "game/config";
        t.USER_INFO_UPDATE = "/game/batchEdit";
        t.USER_DATA_UPDATE = "game/batchUpdate";
        t.USER_DATA_INFO = "game/download";
        t.VIDEO = "game/video";
        t.DY_REPORT = "attribution/dyReport";
        t.DY_ZT = "attribution/ztReport";
        t.KS_REPORT = "attribution/allReport";
        t.KS_ZT = "attribution/ksZtReport";
        t.USER_PROVINCE = "rank/province/data";
        t.USER_PROVINCE_RANK = "rank/province/list";
        t.USER_PROVINCE_RANK_CHANGE = "rank/province/edit";
        t.USER_RANK = "rank/generalList";
        t.USER_RANK_CHANGE = "rank/generalEdit";
      }(r || (r = {}));
      var u = function () {
        function t() {
          this._loginInfo = null;
          this._reportData = {
            data: {},
            callback: []
          };
          this._canSave = false;
        }
        Object.defineProperty(t, "instance", {
          get() {
            null == this._instance && (this._instance = new t());
            return this._instance;
          },
          enumerable: false,
          configurable: true
        });
        t.prototype.req = function (t, e, o) {
          var r;
          var s;
          var u = this;
          undefined === e && (e = null);
          var p = {};
          if (null === (r = this._loginInfo) || undefined === r ? undefined : r.version) {
            p.v = this._loginInfo.version;
            p.version = this._loginInfo.version;
          } else {
            p.v = zs.gameConfig.v;
            p.version = zs.gameConfig.v;
          }
          p.reqId = Date.now() + "_" + Math.ceil(1e3 * Math.random());
          p.gid = zs.gameConfig.gid;
          Object.assign(p, e || {});
          var d = "".concat(zs.gameConfig.debug ? "https://test-gameapi2.zxmn2018.com/" : "https://gamesapi2.aslk2018.com/", "v2/").concat(t);
          var h = {
            "content-type": "application/json"
          };
          (null === (s = this._loginInfo) || undefined === s ? undefined : s.token) && (h.authorization = this._loginInfo.token);
          return new Promise(function (e, r) {
            return n(u, undefined, undefined, function () {
              var n;
              var s;
              return i(this, function (i) {
                switch (i.label) {
                  case 0:
                    n = {
                      url: d,
                      header: h,
                      data: p
                    };
                    o && Object.assign(n, o);
                    return [4, l.HttpManager.instance.request(n).catch(function (e) {
                      a.Logger.log("网络请求错误, router=", t, "params=", p, "errCode=", e.errCode, "errMsg=", e.errMsg);
                      r(e);
                    })];
                  case 1:
                    if (s = i.sent()) {
                      s.timestamp && c.TimeUtil.updateServerTime(1e3 * s.timestamp);
                      if (1 === s.code) {
                        a.Logger.log("网络请求成功, route=", t, "params=", p, "data=", s.data);
                        e(s.data);
                        return [2];
                      }
                      if (4006 === s.code || 4007 === s.code) {
                        a.Logger.log("您的登录已过期或在其它地点登录");
                        return [2];
                      }
                      a.Logger.log("网络请求错误, router=", t, "params=", p, "errCode=", s.code, "errMsg=", s.msg);
                      r({
                        errCode: s.code,
                        errMsg: s.msg
                      });
                    }
                    return [2];
                }
              });
            });
          });
        };
        t.prototype.login = function (t) {
          return n(this, undefined, undefined, function () {
            var e;
            var o;
            var n;
            var a;
            var c;
            return i(this, function (i) {
              switch (i.label) {
                case 0:
                  e = null;
                  if (s.StringUtil.isEmpty(zs.gameConfig.gid)) {
                    return [2, Promise.reject({
                      errCode: -1,
                      errMsg: "没有填写gid"
                    })];
                  } else {
                    o = t.code;
                    t.account;
                    t.password;
                    n = null;
                    if (o) {
                      return n = {
                        pf: "zs",
                        code: o
                      }, [3, 3];
                    } else {
                      return [3, 1];
                    }
                  }
                case 1:
                  return [4, this.zsLogin()];
                case 2:
                  n = i.sent();
                  "ks" === zs.pf && (n.openid = n.unionID);
                  i.label = 3;
                case 3:
                  n || (n = {});
                  n.gid = zs.gameConfig.gid;
                  n.scene = null === (c = zs.getLaunchOptionsSync()) || undefined === c ? undefined : c.scene;
                  i.label = 4;
                case 4:
                  i.trys.push([4, 6,, 7]);
                  // return [4, this.req(r.LOGIN, n)];
                  return [ 4, {openid:"openid",userId:"userId",isTest: true, version:"1.0.0"} ];
                case 5:
                  e = i.sent();
                  return [3, 7];
                case 6:
                  a = i.sent();
                  console.error("登录错误", a);
                  return [2, Promise.reject(a)];
                case 7:
                  this._loginInfo = e;
                  "0" != zs.gameConfig.v.split(".")[1] && (this._loginInfo.version = zs.gameConfig.v);
                  return [2, this._loginInfo];
              }
            });
          });
        };
        t.prototype.getGameConfig = function () {
          return this.req(r.CONFIG, {
            type: "json"
          });
        };
        t.prototype.dmp = function () {
          var t;
          var e = null;
          var o = null;
          if ("ks" === zs.pf) {
            var n = zs.getLaunchOptionsSync().query || {};
            var i = n.callback;
            var a = n.ksCreativeId;
            var c = undefined === a ? "" : a;
            var l = n.advertiser_id;
            var u = undefined === l ? "" : l;
            var p = n.ksCampaignId;
            var d = undefined === p ? "" : p;
            var h = n.ksUnitId;
            var f = undefined === h ? "" : h;
            if (s.StringUtil.isEmpty(i)) {
              return Promise.reject({
                errCode: -1,
                errMsg: "非快手投放场景，请忽略"
              });
            }
            e = r.KS_REPORT;
            o = {
              clue_token: i,
              creative_id: c,
              advertiser_id: u,
              ad_id: d,
              group_id: f,
              channel: "kuaishou",
              event_type: "1"
            };
          } else if ("tt" === zs.pf) {
            var y = zs.getLaunchOptionsSync().query || {};
            var g = y.clickid;
            var v = y.channel;
            var m = undefined === v ? this._loginInfo.channel || "" : v;
            var _ = y.creativeid;
            c = undefined === _ ? "" : _;
            var S = y.advertiser_id;
            u = undefined === S ? "" : S;
            d = y.adid;
            var b = y.request_id;
            var w = undefined === b ? "" : b;
            var P = y.projectid;
            f = undefined === P ? "" : P;
            var O = y.promotionid;
            var C = undefined === O ? "" : O;
            if (s.StringUtil.isEmpty(g)) {
              return Promise.reject({
                errCode: -1,
                errMsg: "非抖音投放场景，请忽略"
              });
            }
            s.StringUtil.isEmpty(d) && (d = C);
            e = r.DY_REPORT;
            o = {
              click_id: g,
              channel: m,
              creative_id: c,
              advertiser_id: u,
              ad_id: d,
              request_id: w,
              group_id: f,
              event_type: "active"
            };
          }
          if (e) {
            return this.req(e, Object.assign({
              v: "1.0.0",
              version: "1.0.0",
              uid: null === (t = this._loginInfo) || undefined === t ? undefined : t.user_id,
              os: "ios" === zs.getSystemInfoSync().platform ? "1" : "2"
            }, o));
          } else {
            return Promise.reject({
              errCode: -1,
              errMsg: "非直投渠道，请忽略"
            });
          }
        };
        t.prototype.reportAd = function (t) {
          return n(this, undefined, undefined, function () {
            var e;
            var o;
            var n;
            var s;
            var c;
            return i(this, function (i) {
              switch (i.label) {
                case 0:
                  e = {
                    uid: null === (c = this._loginInfo) || undefined === c ? undefined : c.user_id,
                    v: "1.0.0",
                    version: "1.0.0",
                    uvid: "1",
                    video_id: "default",
                    video_name: "默认视频",
                    video_type: "1",
                    os: "ios" === zs.getSystemInfoSync().platform ? "1" : "2",
                    scene: zs.getLaunchOptionsSync().scene
                  };
                  o = null;
                  if ("ks" === zs.pf) {
                    e.channel = "kuaishou";
                    o = r.KS_ZT;
                  } else {
                    "tt" === zs.pf && (o = r.DY_ZT);
                  }
                  n = null;
                  if (!o) {
                    return [3, 4];
                  }
                  i.label = 1;
                case 1:
                  i.trys.push([1, 3,, 4]);
                  return [4, this.req(o, e)];
                case 2:
                  i.sent();
                  return [3, 4];
                case 3:
                  s = i.sent();
                  n = s;
                  return [3, 4];
                case 4:
                  t.complete && this.req(r.VIDEO, {
                    uvid: "1",
                    video_id: "default",
                    video_name: "默认视频",
                    video_type: "3",
                    ecpm: 0,
                    timestamp: Date.now()
                  }).catch(function (t) {
                    a.Logger.debug("普通广告事件上报失败", t);
                  });
                  if (n) {
                    return [2, Promise.reject(n)];
                  } else {
                    return [2, true];
                  }
              }
            });
          });
        };
        t.prototype.getUserData = function () {
          return n(this, undefined, undefined, function () {
            var t;
            var e;
            var o;
            var n;
            var r;
            var a;
            var s;
            var l;
            var u;
            var p;
            var d;
            var h;
            var f;
            return i(this, function (i) {
              switch (i.label) {
                case 0:
                  return [4, this._getUserData()];
                case 1:
                  t = i.sent();
                  if (!t) {
                    t = {};
                  }
                  e = {};
                  o = {};
                  n = {};
                  for (r in t) {
                    if ("base" === (a = r.split("_", 1)[0])) {
                      s = r.substring(5);
                      e[s] = t[r];
                    } else if ("game" === a) {
                      s = r.substring(5);
                      o[s] = t[r];
                    } else if ("report" === a) {
                      s = r.substring(5);
                      n[s] = t[r];
                    }
                  }
                  this._canSave = true;
                  l = zs.getSystemInfoSync();
                  u = zs.getLaunchOptionsSync();
                  p = {};
                  if (t.login) {
                    p.login = t.login;
                  } else {
                    p.login = {};
                  }
                  delete u.query.ad_params;
                  t.reg || (p.reg = {
                    version: this._loginInfo.version,
                    device: "".concat(l.brand, "-").concat(l.model),
                    appVersion: l.version,
                    scene: u.scene,
                    launchQuery: u.query,
                    seegVersion: "1.0.8"
                  });
                  Object.assign(p.login, {
                    version: this._loginInfo.version,
                    device: "".concat(l.brand, "-").concat(l.model),
                    appVersion: l.version,
                    system: l.system,
                    scene: u.scene,
                    launchQuery: u.query
                  });
                  if ((d = c.TimeUtil.getDiffDayNum(1e3 * ((null === (f = this._loginInfo) || undefined === f ? undefined : f.add_time) || 0), Date.now())) <= 7 || 14 == d || 30 == d) {
                    h = "login_".concat(d);
                    p.login[h] = (p.login[h] || 0) + 1;
                  }
                  this._setUserData(p, []);
                  return [2, {
                    base: e,
                    game: o,
                    report: n
                  }];
              }
            });
          });
        };
        t.prototype.setUserData = function (t, e, o) {
          return n(this, undefined, undefined, function () {
            var n;
            var r;
            var a = this;
            return i(this, function () {
              n = {};
              if (t) {
                for (r in t) {
                  n["base_" + r] = t[r];
                }
              }
              if (e) {
                for (r in e) {
                  n["game_" + r] = e[r];
                }
              }
              if (o) {
                for (r in o) {
                  n["report_" + r] = o[r];
                }
              }
              return [2, new Promise(function (t, e) {
                a._setUserData(n, [function (o) {
                  if (null == o) {
                    t(true);
                  } else {
                    e(o);
                  }
                }]);
              })];
            });
          });
        };
        t.prototype.reportUserInfo = function (t, e) {
          return this.req(r.USER_INFO_UPDATE, {
            data: {
              avatar: t,
              nickname: e
            }
          });
        };
        t.prototype.getUserProvince = function () {
          return this.req(r.USER_PROVINCE);
        };
        t.prototype.getProvinceList = function (t) {
          return this.req(r.USER_PROVINCE_RANK, {
            type: t
          });
        };
        t.prototype.addProvinceData = function (t) {
          return this.req(r.USER_PROVINCE_RANK_CHANGE, {
            type: t
          });
        };
        t.prototype.getRankList = function (t, e) {
          return this.req(r.USER_RANK, {
            type: t,
            limit: e
          });
        };
        t.prototype.changeRankData = function (t, e, o, n, i, a) {
          return this.req(r.USER_RANK_CHANGE, {
            type: t,
            value_type: e,
            num: o,
            limit: a,
            time_duration: n,
            rank_data: i
          });
        };
        t.prototype._getUserData = function () {
          return n(this, undefined, undefined, function () {
            return i(this, function () {
              return [2, this.req(r.USER_DATA_INFO)];
            });
          });
        };
        t.prototype._setUserData = function (t, e) {
          return n(this, undefined, undefined, function () {
            var o;
            var n;
            var a;
            var s;
            var c;
            return i(this, function (i) {
              switch (i.label) {
                case 0:
                  if (!this._canSave) {
                    Object.assign(this._reportData.data, t);
                    (c = this._reportData.callback).push.apply(c, e);
                    return [2];
                  }
                  this._canSave = false;
                  i.label = 1;
                case 1:
                  i.trys.push([1, 3,, 4]);
                  return [4, this.req(r.USER_DATA_UPDATE, {
                    data: t
                  })];
                case 2:
                  i.sent();
                  for (s = 0; s < e.length; s++) {
                    e[s] && e[s](null);
                  }
                  this._canSave = true;
                  o = this._reportData.data;
                  if (Object.keys(o).length > 0) {
                    this._reportData.data = {};
                    (n = this._reportData.callback).length > 0 && (this._reportData.callback = []);
                    this._setUserData(o, n);
                  }
                  return [3, 4];
                case 3:
                  a = i.sent();
                  this._reportData.data = Object.assign(t, this._reportData.data);
                  for (s = 0; s < e.length; s++) {
                    e[s] && e[s](a);
                  }
                  this._canSave = true;
                  return [3, 4];
                case 4:
                  return [2];
              }
            });
          });
        };
        t.prototype.zsLogin = function () {
          return new Promise(function (t, e) {
            zs.login({
              old: zs.gameConfig.old,
              success(e) {
                t(e);
              },
              fail(t) {
                e(t);
              }
            });
          });
        };
        t._instance = null;
        return t;
      }();
      e.ZSHttp = u;
    },
    862: function _(t, e, o) {
      var n = this && this.__awaiter || function (t, e, o, n) {
        return new (o || (o = Promise))(function (i, r) {
          function a(t) {
            try {
              c(n.next(t));
            } catch (t) {
              r(t);
            }
          }
          function s(t) {
            try {
              c(n.throw(t));
            } catch (t) {
              r(t);
            }
          }
          function c(t) {
            var e;
            if (t.done) {
              i(t.value);
            } else {
              (e = t.value, e instanceof o ? e : new o(function (t) {
                t(e);
              })).then(a, s);
            }
          }
          c((n = n.apply(t, e || [])).next());
        });
      };
      var i = this && this.__generator || function (t, e) {
        var o;
        var n;
        var i;
        var r;
        var a = {
          label: 0,
          sent() {
            if (1 & i[0]) {
              throw i[1];
            }
            return i[1];
          },
          trys: [],
          ops: []
        };
        r = {
          next: s(0),
          throw: s(1),
          return: s(2)
        };
        "function" == typeof Symbol && (r[Symbol.iterator] = function () {
          return this;
        });
        return r;
        function s(s) {
          return function (c) {
            return function (s) {
              if (o) {
                throw new TypeError("Generator is already executing.");
              }
              for (; r && (r = 0, s[0] && (a = 0)), a;) {
                try {
                  o = 1;
                  if (n && (i = 2 & s[0] ? n.return : s[0] ? n.throw || ((i = n.return) && i.call(n), 0) : n.next) && !(i = i.call(n, s[1])).done) {
                    return i;
                  }
                  n = 0;
                  i && (s = [2 & s[0], i.value]);
                  switch (s[0]) {
                    case 0:
                    case 1:
                      i = s;
                      break;
                    case 4:
                      a.label++;
                      return {
                        value: s[1],
                        done: false
                      };
                    case 5:
                      a.label++;
                      n = s[1];
                      s = [0];
                      continue;
                    case 7:
                      s = a.ops.pop();
                      a.trys.pop();
                      continue;
                    default:
                      if (!((i = (i = a.trys).length > 0 && i[i.length - 1]) || 6 !== s[0] && 2 !== s[0])) {
                        a = 0;
                        continue;
                      }
                      if (3 === s[0] && (!i || s[1] > i[0] && s[1] < i[3])) {
                        a.label = s[1];
                        break;
                      }
                      if (6 === s[0] && a.label < i[1]) {
                        a.label = i[1];
                        i = s;
                        break;
                      }
                      if (i && a.label < i[2]) {
                        a.label = i[2];
                        a.ops.push(s);
                        break;
                      }
                      i[2] && a.ops.pop();
                      a.trys.pop();
                      continue;
                  }
                  s = e.call(t, a);
                } catch (t) {
                  s = [6, t];
                  n = 0;
                } finally {
                  o = i = 0;
                }
              }
              if (5 & s[0]) {
                throw s[1];
              }
              return {
                value: s[0] ? s[1] : undefined,
                done: true
              };
            }([s, c]);
          };
        }
      };
      Object.defineProperty(e, "__esModule", {
        value: true
      });
      var r = o(397);
      var a = o(652);
      var s = o(997);
      var c = o(49);
      o(629);
      o(184);
      (function () {
        var t = this;
        var e = false;
        var o = false;
        var l = true;
        var u = [];
        var p = [];
        var d = 0;
        var h = 0;
        var f = null;
        var y = 0;
        var g = null;
        var v = null;
        var m = null;
        var _ = [];
        var S = [];
        var b = [];
        var w = {};
        var P = null;
        var O = null;
        var C = window.seeg = window.seeg || {};
        function N() {
          var t = c.TimeUtil.getTime();
          var e = {};
          var o = false;
          if (_.length > 0) {
            _.forEach(function (t) {
              e[t] = g[t];
            });
            e._saveTime = t;
            _.length = 0;
            o = true;
          }
          var n = {};
          if (S.length > 0) {
            S.forEach(function (t) {
              n[t] = v[t];
            });
            n._saveTime = t;
            S.length = 0;
            o = true;
          }
          var i = {};
          if (b.length > 0) {
            b.forEach(function (t) {
              i[t] = m[t];
            });
            b.length = 0;
            o = true;
          }
          o && r.ZSHttp.instance.setUserData(e, n, i).catch(function () {});
        }
        function A(t, e, o, n, i, a) {
          undefined === i && (i = "");
          undefined === a && (a = 100);
          var s = c.TimeUtil.getTime();
          var l = 0 === n ? c.TimeUtil.getDayEndTime(s) : 1 === n ? c.TimeUtil.getWeekEndTime(s) : c.TimeUtil.getMonthEndTime(s);
          try {
            r.ZSHttp.instance.changeRankData(t, e, o, Math.ceil((l - s) / 1e3), i, a);
          } catch (t) {}
        }
        function M(t) {
          return n(this, undefined, undefined, function () {
            var e;
            var o;
            return i(this, function (n) {
              switch (n.label) {
                case 0:
                  if (v) {
                    null == t || t({
                      errCode: 0,
                      data: v
                    });
                    return [2];
                  }
                  t && p.push(t);
                  if (l) {
                    return [2];
                  }
                  l = true;
                  n.label = 1;
                case 1:
                  n.trys.push([1, 3,, 4]);
                  return [4, r.ZSHttp.instance.getUserData()];
                case 2:
                  e = n.sent();
                  return [3, 4];
                case 3:
                  o = n.sent();
                  l = false;
                  p.forEach(function (t) {
                    t({
                      errCode: (null == o ? undefined : o.errCode) || -1,
                      errMsg: "获取数据失败"
                    });
                  });
                  p.length = 0;
                  return [2];
                case 4:
                  g = e.base;
                  v = e.game;
                  m = e.report;
                  P || (P = setInterval(function () {
                    N();
                  }, 6e4));
                  p.forEach(function (t) {
                    t({
                      errCode: 0,
                      data: e.game
                    });
                  });
                  p.length = 0;
                  return [2];
              }
            });
          });
        }
        function I(t) {
          return n(this, arguments, undefined, function (t, e) {
            var n;
            var s;
            var p;
            var d;
            undefined === e && (e = 2);
            return i(this, function (i) {
              switch (i.label) {
                case 0:
                  if (o) {
                    a.Logger.debug("正在登录中...");
                    return [2];
                  }
                  o = true;
                  i.label = 1;
                case 1:
                  i.trys.push([1, 3,, 4]);
                  return [4, r.ZSHttp.instance.login({})];
                case 2:
                  n = i.sent();
                  return [3, 4];
                case 3:
                  s = i.sent();
                  o = false;
                  if (t < e) {
                    I(t + 1);
                    return [2];
                  } else {
                    a.Logger.error("用户登录失败", s);
                    return [2];
                  }
                case 4:
                  tdAppSdk.setOpenId(n.openid);
                  p = Number(n.version.split(".")[1]);
                  f = {
                    userId: n.user_id,
                    openId: n.openid,
                    isTest: 1 === n.is_white_list,
                    abTest: p
                  };
                  y = c.TimeUtil.getDiffDayNum(1e3 * (n.add_time || 0), Date.now());
                  if (u.length > 0) {
                    d = Object.assign({}, f);
                    u.forEach(function (t) {
                      null == t || t(d);
                    });
                  }
                  u.length = 0;
                  l = false;
                  M();
                  r.ZSHttp.instance.dmp().then(function () {
                    a.Logger.debug("投放用户上报成功");
                  }).catch(function (t) {
                    a.Logger.error("投放用户上报失败", t);
                  });
                  a.Logger.debug("用户登录成功");
                  return [2];
              }
            });
          });
        }
        C.init = function (t) {
          if (!e) {
            if (null == t) {
              throw "参数不能为空";
            }
            t.loggerLevel && a.Logger.setLoggerLevel(t.loggerLevel);
            if (s.StringUtil.isEmpty(t.gid)) {
              a.Logger.error("gid不能为空");
            } else {
              var o = t.gid.split("_");
              if (1 !== o.length) {
                if ("web" == zs.pf || t.gid.startsWith(zs.pf)) {
                  a.Logger.debug("SDK开始集成，版本=", "1.0.8");
                  e = true;
                  zs.gameConfig = zs.gameConfig || {};
                  zs.gameConfig.gid = t.gid;
                  zs.gameConfig.v = t.version || "1.0.0";
                  zs.gameConfig.old = t.old || false;
                  if (s.StringUtil.isEmpty(t.tdAppKey)) {
                    a.Logger.error("请填写正确的TDAppKey");
                  } else {
                    var n = "1.0.0";
                    var i = zs.getAccountInfoSync && zs.getAccountInfoSync() || null;
                    i && i.miniProgram && i.miniProgram.version && (n = i.miniProgram.version);
                    tdAppSdk.init({
                      versionCode: 1,
                      versionName: n,
                      displayName: o[1],
                      appKey: t.tdAppKey || "",
                      channel: t.gid
                    });
                    I(0);
                  }
                } else {
                  a.Logger.error("请填写正确的gid，或者请勿在该sdk前修改ks、tt、wx等平台全局变量");
                }
              } else {
                a.Logger.error("请填写正确的gid");
              }
            }
          }
        };
        C.getGameConfig = function (t) {
          C.onLoginRet(function () {
            var e = t.success;
            var o = t.fail;
            r.ZSHttp.instance.getGameConfig().then(function (t) {
              null == e || e(t);
            }).catch(function (t) {
              null == o || o(t);
            });
          });
        };
        C.onLoginRet = function (t) {
          if (f) {
            null == t || t(Object.assign({}, f));
          } else {
            u.push(t);
          }
        };
        C.getUserData = M;
        C.reportAd = function (t) {
          if (f) {
            r.ZSHttp.instance.reportAd(t).then(function () {
              a.Logger.debug("广告上报成功");
            }).catch(function (t) {
              a.Logger.error("广告上报失败", t);
            });
            t.name && function (t) {
              var e = "rv_".concat(t);
              g[e] = (g[e] || 0) + 1;
              g.rv_sum = (g.rv_sum || 0) + 1;
              _.push(e, "rv_sum");
              if (y <= 7 || 14 === y || 30 === y) {
                var o = "rv_sum_".concat(y);
                g[o] = (g[o] || 0) + 1;
                _.push(o);
              }
              N();
            }(t.name);
          } else {
            I(0, 0);
          }
        };
        C.now = c.TimeUtil.getTime;
        C.onEvent = function (t, e) {
          tdAppSdk.event({
            id: t,
            params: e
          });
        };
        C.reportEvent = function (t, e) {
          if (m) {
            b.push(t);
            m[t] = e;
          }
        };
        C.reportEventAdd = function (t, e) {
          m && C.reportEvent(t, (m[t] || 0) + e);
        };
        C.reportEventStart = function (t) {
          w[t] = c.TimeUtil.getTime();
        };
        C.reportEventEnd = function (t) {
          C.reportEventAdd("time_".concat(t), c.TimeUtil.getTime() - w[t]);
        };
        C.setUserData = function (t) {
          if (v) {
            var e = c.TimeUtil.getTime();
            if (!d || e - d > 6e4) {
              d = e;
              h = 0;
            }
            ++h > 6 && a.Logger.debug("一分钟内请求该接口超过6次，请注意检查逻辑");
            Object.assign(v, t);
            S.push.apply(S, Object.keys(t));
            N();
          }
        };
        C.reportUserInfo = function (t, e, o) {
          r.ZSHttp.instance.reportUserInfo(t, e, o).catch(function () {});
        };
        C.getUserProvince = function () {
          return n(t, undefined, undefined, function () {
            return i(this, function (t) {
              switch (t.label) {
                case 0:
                  if (O) {
                    return [2, O];
                  } else {
                    return [4, r.ZSHttp.instance.getUserProvince().catch(function () {})];
                  }
                case 1:
                  return [2, O = t.sent()];
              }
            });
          });
        };
        C.getProvinceList = function (e) {
          return n(t, undefined, undefined, function () {
            var t;
            var o;
            var n;
            var a;
            return i(this, function (i) {
              switch (i.label) {
                case 0:
                  return [4, r.ZSHttp.instance.getProvinceList(e).catch(function () {})];
                case 1:
                  null == (t = i.sent()) && (t = {
                    list: []
                  });
                  null == t.list && (t.list = []);
                  n = function n(e) {
                    t.list.find(function (t) {
                      return t.province_code == e;
                    }) || t.list.push({
                      province: o[e],
                      province_code: e,
                      num: 1
                    });
                  };
                  for (a in o = {
                    p11: "北京",
                    p12: "天津",
                    p13: "河北",
                    p14: "山西",
                    p15: "内蒙古",
                    p21: "辽宁",
                    p22: "吉林",
                    p23: "黑龙江",
                    p31: "上海",
                    p32: "江苏",
                    p33: "浙江",
                    p34: "安徽",
                    p35: "福建",
                    p36: "江西",
                    p37: "山东",
                    p41: "河南",
                    p42: "湖北",
                    p43: "湖南",
                    p44: "广东",
                    p45: "广西",
                    p46: "海南",
                    p50: "重庆",
                    p51: "四川",
                    p52: "贵州",
                    p53: "云南",
                    p54: "西藏",
                    p61: "陕西",
                    p62: "甘肃",
                    p63: "青海",
                    p64: "宁夏",
                    p65: "新疆",
                    p71: "台湾",
                    p81: "香港",
                    p82: "澳门"
                  }) {
                    n(a);
                  }
                  return [2, t];
              }
            });
          });
        };
        C.addProvinceData = function (t) {
          try {
            r.ZSHttp.instance.addProvinceData(t);
          } catch (t) {}
        };
        C.getRankList = function (t, e) {
          undefined === e && (e = 100);
          return r.ZSHttp.instance.getRankList(t, e).catch(function () {});
        };
        C.changeDayRankData = function (t, e, o, n, i) {
          undefined === n && (n = "");
          undefined === i && (i = 100);
          A(t, e, o, 0, n, i);
        };
        C.changeWeekRankData = function (t, e, o, n, i) {
          undefined === n && (n = "");
          undefined === i && (i = 100);
          A(t, e, o, 1, n, i);
        };
        C.changeMonthRankData = function (t, e, o, n, i) {
          undefined === n && (n = "");
          undefined === i && (i = 100);
          A(t, e, o, 2, n, i);
        };
      })();
    },
    652: function _(t, e) {
      var o;
      var n;
      var i = this && this.__spreadArray || function (t, e, o) {
        if (o || 2 === arguments.length) {
          var n;
          var i = 0;
          for (var r = e.length; i < r; i++) {
            if (!(!n && i in e)) {
              n || (n = Array.prototype.slice.call(e, 0, i));
              n[i] = e[i];
            }
          }
        }
        return t.concat(n || Array.prototype.slice.call(e));
      };
      Object.defineProperty(e, "__esModule", {
        value: true
      });
      e.Logger = e.LoggerLevel = undefined;
      (function (t) {
        t[t.OFF = 0] = "OFF";
        t[t.ERROR = 1] = "ERROR";
        t[t.WARN = 2] = "WARN";
        t[t.DEBUG = 3] = "DEBUG";
        t[t.INFO = 4] = "INFO";
        t[t.ALL = 5] = "ALL";
      })(o || (e.LoggerLevel = o = {}));
      (function (t) {
        var e = "[Seeg SDK]";
        var n = o.OFF;
        t.setLoggerLevel = function (t) {
          n = t;
        };
        t.log = function () {
          var t = [];
          for (var r = 0; r < arguments.length; r++) {
            t[r] = arguments[r];
          }
          n === o.ALL && console.log.apply(console, i([e], t, true));
        };
        t.debug = function () {
          var t = [];
          for (var r = 0; r < arguments.length; r++) {
            t[r] = arguments[r];
          }
          n >= o.DEBUG && console.debug.apply(console, i([e], t, true));
        };
        t.info = function () {
          var t = [];
          for (var r = 0; r < arguments.length; r++) {
            t[r] = arguments[r];
          }
          n >= o.INFO && console.info.apply(console, i([e], t, true));
        };
        t.warn = function () {
          var t = [];
          for (var r = 0; r < arguments.length; r++) {
            t[r] = arguments[r];
          }
          n >= o.WARN && console.warn.apply(console, i([e], t, true));
        };
        t.error = function () {
          var t = [];
          for (var r = 0; r < arguments.length; r++) {
            t[r] = arguments[r];
          }
          n >= o.ERROR && console.error.apply(console, i([e], t, true));
        };
      })(n || (e.Logger = n = {}));
    },
    997: function _(t, e) {
      var o;
      Object.defineProperty(e, "__esModule", {
        value: true
      });
      e.StringUtil = undefined;
      (o || (e.StringUtil = o = {})).isEmpty = function (t) {
        return null == t || "" === t;
      };
    },
    49: function _(t, e) {
      Object.defineProperty(e, "__esModule", {
        value: true
      });
      e.TimeUtil = undefined;
      var o = function () {
        function t() {}
        t.updateServerTime = function (t) {
          this._diff = t - new Date().getTime();
        };
        t.getTime = function () {
          return new Date().getTime() + this._diff;
        };
        t.getDayStartTime = function (t) {
          return new Date(t).setHours(0, 0, 0, 0);
        };
        t.getDayEndTime = function (t) {
          return new Date(t).setHours(23, 59, 59, 999);
        };
        t.getWeekEndTime = function (t) {
          var e = new Date(t).getDay();
          return this.getDayEndTime(t) + (0 === e ? 0 : 864e5 * (7 - e));
        };
        t.getMonthEndTime = function (t) {
          var e = new Date(t);
          if (11 === e.getMonth()) {
            e.setFullYear(e.getFullYear() + 1, 0, 0);
          } else {
            e.setMonth(e.getMonth() + 1, 0);
          }
          return e.setHours(23, 59, 59, 999);
        };
        t.getDiffDayNum = function (t, e) {
          var o = this.getDayStartTime(t);
          var n = this.getDayStartTime(e);
          return Math.ceil(Math.abs(o - n) / 864e5);
        };
        t._diff = 0;
        return t;
      }();
      e.TimeUtil = o;
    }
  };
  var e = {};
  function o(n) {
    var i = e[n];
    if (undefined !== i) {
      return i.exports;
    }
    var r = e[n] = {
      id: n,
      loaded: false,
      exports: {}
    };
    t[n].call(r.exports, r, r.exports, o);
    r.loaded = true;
    return r.exports;
  }
  o.g = function () {
    if ("object" == (typeof globalThis === "undefined" ? "undefined" : typeof globalThis)) {
      return globalThis;
    }
    try {
      return this || new Function("return this")();
    } catch (t) {
      if ("object" == (typeof window === "undefined" ? "undefined" : typeof window)) {
        return window;
      }
    }
  }();
  o.nmd = function (t) {
    t.paths = [];
    t.children || (t.children = []);
    return t;
  };
  o(862);
})();